-
Notifications
You must be signed in to change notification settings - Fork 225
Issue #364 Add Support to Kafka Source for Resource spec #399
Conversation
Hi @lberk. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
In the
you can generate that file (but CAUTION) with:
but only ... pick the relevant diff ... I'd also suggest adding this new feature to the samples, to make it a little bit more visible |
Regarding the coverage - let's add a test that does NOT specify the
than we get back to 100% :) |
I deployed a source, no specific setting (assuming defaults), doing
Expected ? |
looking in the underlying
|
Now, updating/changing a running source (by explicitly adding NON-DEFAULT settings) and runningk gives me:
But looking at the underlying
related: #400 |
Now, creating a new source, where I set values, like:
It's all correct in the |
For the defaults, lets use:
requests": {"memory": "512Mi", "cpu": "250m"}, "limits": {"memory":
"512Mi", "cpu": "250m"}}
we use this as our setting currently
On Tue 7. May 2019 at 07:23, covbot ***@***.***> wrote:
The following is the coverage report on pkg/.
Say /test pull-knative-eventing-sources-go-coverage to re-run this
coverage report
File Old Coverage New Coverage Delta
contrib/kafka/pkg/reconciler/resources/receive_adapter.go
<https://storage.cloud.google.com/knative-prow/pr-logs/pull/knative_eventing-sources/399/pull-knative-eventing-sources-go-coverage/1125631815193726979/artifacts/line-cov.html#file1>
100.0% 80.0% -20.0
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#399 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABGPTSJQRDZELJPIHQ2T6TPUEG6XANCNFSM4HLEMG7Q>
.
--
Sent from Gmail Mobile
|
Updated as requested, and rebased on master
|
deploying a source, without the
I'd expect the |
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deploying a source, without the resource config, I still see it empty, ... I'd expect the sepc.resources would tell the actual defaults
I think we normally achieve that through Webhook defaulting. I don't think I've seen a reconciler manipulate the spec
of the resource it is reconciling (although I'm sure someone somewhere does it).
The following is the coverage report on pkg/.
|
Add the kafka_types for resources requests and limits (cpu, memory) which will translate to the deployment template as resources.limits.cpu resources.limits.memory resources.requests.cpu resources.requests.memory Use kmp for testing intead of cmp. As seen in serving issue #2622, we should use knative/pkg/kmp (otherwise we get unit test errors) Update the Gopkg.lock file accordingly
config/300-kafkasource.yaml - add in resource properties pkg/reconcilier/resources/receive_adapter.go - increase the defaults to proper values pkg/reconcilier/resources/receive_adapter_test.go - add second testcase (we should probably create a proper test struct in the future) samples/event-sources.yaml - add in an example resource specification pkg/apis/sources/v1alpha1/kafka_types - Fix spelling mistake caught by sockpuppet Readd cmp for testing/building
…rements" This reverts commit 76ffab5.
As per feedback, `kubectl get kafkasource -oyaml` should show some status regarding the correctness of the resources supplied, and if they were correctly parsed. Add this, as well as a description/error message for which resource failed (and why). Update kafkasource_test accordingly
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: evankanderson, lberk, matzew The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
As mentioned in Issue #364 , this is experimenting adding resource spec for
resources.limits.cpu
resources.limits.memory
resources.requests.cpu
resources.requests.memory
As part of this change, we've moved the cmp test to kmp (was hitting errors similar to those seen in Serving 2622), Matching the approach in the serving repo.