-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Integration of certmanager for IntegrationSink #8385
base: main
Are you sure you want to change the base?
Changes from all commits
5f7e255
ee13099
f9dedc8
ca17520
cf6993b
61d3b03
df66e7b
1996086
965be22
7eb11b1
b343e1c
a0d401e
3e1e2a7
a01d2a7
a2f502d
838ac03
17f8e71
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,13 @@ kube::codegen::gen_client \ | |
--with-watch \ | ||
"${REPO_ROOT_DIR}/pkg/apis" | ||
|
||
kube::codegen::gen_client \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @matzew You can clean up this as in https://github.com/knative/serving/pull/15703/files#diff-149dfe7bb29d1191dceae3a52915e750e64b7f87257a5fb309c29d3056e2a95d. We are removing the generated clientsets in favor of the original ones |
||
--boilerplate "${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt" \ | ||
--output-dir "${REPO_ROOT_DIR}/pkg/client/certmanager" \ | ||
--output-pkg "knative.dev/eventing/pkg/client/certmanager" \ | ||
--with-watch \ | ||
"${REPO_ROOT_DIR}/vendor/github.com/cert-manager/cert-manager/pkg/apis" | ||
|
||
group "Knative Codegen" | ||
|
||
# Knative Injection | ||
|
@@ -52,6 +59,13 @@ ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh "injection" \ | |
"sinks:v1alpha1 eventing:v1alpha1 eventing:v1beta1 eventing:v1beta2 eventing:v1beta3 eventing:v1 messaging:v1 flows:v1 sources:v1alpha1 sources:v1beta2 sources:v1 duck:v1beta1 duck:v1" \ | ||
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt | ||
|
||
# Knative Injection (for cert-manager) | ||
${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh "injection" \ | ||
knative.dev/eventing/pkg/client/certmanager github.com/cert-manager/cert-manager/pkg/apis \ | ||
"certmanager:v1 acme:v1" \ | ||
--disable-informer-init \ | ||
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt | ||
|
||
group "Generating API reference docs" | ||
|
||
${REPO_ROOT_DIR}/hack/update-reference-docs.sh | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
I think this does not work, when changing the
feature
cfg afterwards. In thecontroller.go
of the integrationsink I am getting anil
pointer... when accessing thecmCertificateLister
there.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.
Yes, it doesn't, we could start / stop the informer manually without injection based on the value
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.
you mean the "cert manager" informers, right? start / stop based on cfg change of the
config-feature
CM?Any pointer to similar code for this?
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.
here we start a "custom" configmap informer using the factory
eventing/pkg/adapter/v2/main.go
Lines 227 to 250 in b00da59
the "stop" is based on the passed context and there we can use the usual "context / cancel" pair
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.
Thanks
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.
A bit of background info. We discussed a more dynamic approach in the past here. Serving requires for the controller pod to be restarted. In general making it dynamic here makes more sense as it reacts on some cm change and you can freely define your main stuff as in the adapter's main. For Serving once you disable encryption there will be downtime afaik and we wanted minimal changes back then to move with the internal encryption feature. cc @ReToCode if he has anything to add/correct me.
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.
@skonto so you suggest going the route via knative/pkg#2989 ?
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.
It depends on the UX. If you dont want a pod restart you need the dynamic informer addition/removal. The flag just avoids generating by default the init code that registers an informer factory and the related informer. We don't want to register that immediately because the feature might be disabled. We cant do this dynamically without a restart because registration does not start the informer we have to wait for sharedmain to do this. So right now once sharedmain does start the controllers and the informers you can't start a new one but potentially we could extend sharedmain to do this.