feat: add ca-injector controller for cert-controller-manager-next-generation - #776
feat: add ca-injector controller for cert-controller-manager-next-generation#776janosbinder wants to merge 2 commits into
Conversation
…eration Implements the ca-injector feature (issue gardener#185) for the next-generation binary, automatically populating caBundle fields of injectable Kubernetes resources from a CA source driven by annotations. Co-authored-by: Claude <claude@anthropic.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @janosbinder! |
|
Hi @janosbinder. Thanks for your PR. I'm waiting for a gardener member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
marc1404
left a comment
There was a problem hiding this comment.
/kind task
/kind enhancement
/ok-to-test
Regenerates zz_generated.conversion.go, zz_generated.deepcopy.go, and zz_generated.defaults.go after adding CAInjectorControllerConfig; also applies goimports formatting to reconciler.go.
|
@janosbinder |
|
As the legacy controller is based on the legacy controller-manager-library, an implementation of this feature would look quite different. It needs to be integrated into |
Summary
cainjectorpackage underpkg/certman2/controller/cainjector/with four per-kind controllers (ValidatingWebhookConfiguration,MutatingWebhookConfiguration,CustomResourceDefinition,APIService) that automatically populatecaBundlefields from a CA source driven by annotationsCAInjectorControllerConfigtoCertManagerConfiguration(disabled by default; enable withcontrollers.caInjector.enabled: true)apiregistration/v1(APIService) inClusterSchemecmd/cert-controller-manager-next-generation/app/app.godocs/usage/ca-injector.mdwith full feature documentation## CA Injectorsection toREADME.mdAnnotations introduced
cert.gardener.cloud/inject-ca-fromca.crtfrom the Secret backing the namedCertificatecert.gardener.cloud/inject-ca-from-secretca.crtdirectly from the namedSecretcert.gardener.cloud/allow-direct-injection"true"to permit direct-secret injectionTest plan
allow-direct-injectionguard, and requeue-on-missing-CA behaviourgo test ./pkg/certman2/...— all packages greengo build ./cmd/cert-controller-manager-next-generation/...— binary builds clean