Use knative/pkg/webhooks#352
Conversation
|
Grant for LGTM: Evan for Approval: |
|
/cc @mattmoor 🍾 👍 💯 🦃 |
|
/retest |
|
/hold |
|
depends on knative/pkg#44 |
d0d3e35 to
a9bb0c7
Compare
|
/hold cancel |
|
ISTIO!!! /test pull-knative-eventing-integration-tests |
| "go.uber.org/zap" | ||
| v1alpha1channels "github.com/knative/eventing/pkg/apis/channels/v1alpha1" | ||
| v1alpha1feeds "github.com/knative/eventing/pkg/apis/feeds/v1alpha1" | ||
| v1alpha1flows "github.com/knative/eventing/pkg/apis/flows/v1alpha1" |
There was a problem hiding this comment.
Why v1alpha1flows instead of flowsv1alpha1 as used in other controllers? I'm fine with this style, just curious if there's a reason.
There was a problem hiding this comment.
It was not intentional. I can change to the normal way. Just got it mixed up
There was a problem hiding this comment.
Were you going to change this?
| var _ apis.Validatable = (*Feed)(nil) | ||
| var _ apis.Defaultable = (*Feed)(nil) | ||
| var _ apis.Immutable = (*Feed)(nil) | ||
| var _ webhook.GenericCRD = (*Feed)(nil) |
There was a problem hiding this comment.
No runtime.Object cast here?
There was a problem hiding this comment.
so.. some egg on my face... webhook.GenericCRD has all of these
There was a problem hiding this comment.
I could boil it down to just webhook.GenericCRD
|
|
||
| // TODO(n3wscott): these tests will go away when we move to new type of webhooks. | ||
|
|
||
| func TestNewChannelNSBus(t *testing.T) { |
There was a problem hiding this comment.
Did these tests (and the tests for the other types) all make it over to the apis packages?
There was a problem hiding this comment.
I did move them all as I was writing the other validation parts
There was a problem hiding this comment.
I can confirm. I may have pushed for some additional tests, and @n3wscott said he'd add them after this PR.
|
/hold |
evankanderson
left a comment
There was a problem hiding this comment.
Only a few minor comments, looking very good!
| Port: 443, | ||
| SecretName: "eventing-webhook-certs", | ||
| WebhookName: "webhook.eventing.knative.dev", | ||
| ServiceName: "webhook", |
There was a problem hiding this comment.
Changing the name of the webhook service is likely to mean that anyone with the existing webhook installed is going to run with two webhooks until they delete the old one by hand.
Put this in "release notes" -- steal the format from knative/serving if we don't have it.
There was a problem hiding this comment.
done, and made a PR to update our template: #357
| role: webhook | ||
| name: webhook | ||
| namespace: knative-eventing | ||
| spec: |
There was a problem hiding this comment.
Why are the Service and the Deployment for the webhook in separate files?
Can we combine these at the 400 level?
There was a problem hiding this comment.
(But don't do this in this PR)
| var _ apis.Validatable = (*Channel)(nil) | ||
| var _ apis.Defaultable = (*Channel)(nil) | ||
| var _ apis.Immutable = (*Channel)(nil) | ||
| var _ runtime.Object = (*Channel)(nil) |
There was a problem hiding this comment.
It sounds like you don't need this anymore?
| var _ apis.Validatable = (*Flow)(nil) | ||
| var _ apis.Defaultable = (*Flow)(nil) | ||
| var _ apis.Immutable = (*Flow)(nil) | ||
| var _ runtime.Object = (*Flow)(nil) |
There was a problem hiding this comment.
Another runtime.Object that's unneeded.
|
|
||
| // TODO(n3wscott): these tests will go away when we move to new type of webhooks. | ||
|
|
||
| func TestNewChannelNSBus(t *testing.T) { |
There was a problem hiding this comment.
I can confirm. I may have pushed for some additional tests, and @n3wscott said he'd add them after this PR.
|
this time for real, ISTIO!!! /test pull-knative-eventing-integration-tests |
| "go.uber.org/zap" | ||
| v1alpha1channels "github.com/knative/eventing/pkg/apis/channels/v1alpha1" | ||
| v1alpha1feeds "github.com/knative/eventing/pkg/apis/feeds/v1alpha1" | ||
| v1alpha1flows "github.com/knative/eventing/pkg/apis/flows/v1alpha1" |
There was a problem hiding this comment.
Were you going to change this?
| role: webhook | ||
| name: webhook | ||
| namespace: knative-eventing | ||
| spec: |
There was a problem hiding this comment.
(But don't do this in this PR)
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: evankanderson, grantr, n3wscott The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test pull-knative-eventing-integration-tests |
|
There's still the comment in Also, can you update the PR description to cover the addition of Generation and the rationale for same? |
|
/hold cancel |
|
The following is the coverage report on pkg/.
|
|
/test pull-knative-eventing-integration-tests |
|
/lgtm |
…native#352) Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Moves to use the shared controller in /pkg.
Removes all eventing/pkg/webhook/ code because it is no longer needed 🎉
GenericCRD support (the interface) is needed for the pkg/webhook framework to operate on types generically. In testing this I found panics realated to types that lacked the method
GetSpecJSON.Found that spec.generation was missing and knative still uses that to track the generation until there is full support for /status updates for CRDs. Added generation to all specs
Release Note