Repository navigation
feat(webhook): expose cert rotator lifetimes as flags and chart values - #662
Conversation
…etimes v0.1.6 was tagged before telekom/t-caas-go-library#52 merged, so pin the merge commit until a release contains certrotation.Config's lifetime fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: MaxRink <maximilian.rink@telekom.de>
Add --webhook-ca-validity, --webhook-cert-validity, --webhook-cert-renew-before and --webhook-cert-check-interval, defaulting to the library's Default* constants, and the matching optional values under webhookServer.certificates. Unset values render no flag, so the default chart output is unchanged. The webhook command validates the rotator config before creating the manager and fails fast on an error. Closes #661 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: MaxRink <maximilian.rink@telekom.de>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the webhook certificate lifetime configuration changes.
No open issues 🎉
What changed in this PR
Exposes webhook certificate lifetimes and renewal settings through Auth Operator CLI flags and Helm values, addressing #661 while preserving existing defaults.
Changes:
- Adds four duration flags and validates rotator configuration before manager creation.
- Adds optional Helm values, duration schema checks, and conditional flag rendering.
- Updates the library dependency, tests, and documentation, including behavior with a provided CA.
| File | Description |
|---|---|
go.sum |
Updates checksums for the certificate-rotation library revision. |
go.mod |
Pins the library revision supporting configurable lifetimes. |
docs/operator-guide.md |
Documents settings, validation, renewal behavior, and provided-CA interactions. |
cmd/webhook.go |
Registers duration flags, builds rotator configuration, and validates startup settings. |
cmd/cmd_test.go |
Checks flag defaults and early rejection of inconsistent lifetimes. |
chart/auth-operator/webhook_certificate_lifetimes_test.go |
Tests optional flag rendering and invalid duration rejection. |
chart/auth-operator/values.yaml |
Defines optional certificate lifetime values with documented defaults. |
chart/auth-operator/values.schema.json |
Adds duration patterns and updates provided-CA descriptions. |
chart/auth-operator/templates/webhook-server-deployment.yaml |
Renders lifetime flags only when values are set. |
chart/auth-operator/README.md |
Documents chart settings and lifetime constraints. |
CHANGELOG.md |
Records the new flags and Helm values. |
.github/copilot-instructions.md |
Updates the webhook flag reference. |
Review effort: Balanced
Security scan reportCommit: Security findings are advisory, not merge blockers. Build, test and licensing checks remain blocking. A successful job is not proof of a clean scan; findings and scanner errors are called out below.
See the linked logs for complete findings and any scanner setup failures. |
Output DeltaOutput differences were detected. The full diff is posted below in 2 bot comment(s).
The compare job downloads artifacts only; it does not checkout or execute pull-request code. |
📊 Output Delta ReportFull output diff from Trusted main baseline -> PRMetrics
|
📊 Output Delta Report (cont.)Full output diff from Latest release tag -> PRMetrics
|
… bump t-caas-go-library to v0.1.7 The schema pattern rejected durations time.ParseDuration accepts: a leading "+", a leading or trailing ".", and the Greek-mu "μs" unit. Extend the pattern and test the accepted spellings. Replace the library pseudo-version with the v0.1.7 tag (same commit). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: MaxRink <maximilian.rink@telekom.de>
Closes #661
Description
Exposes the webhook cert rotator's lifetimes from
t-caas-go-librarypkg/certrotation(telekom/t-caas-go-library#52):--webhook-ca-validitywebhookServer.certificates.caValidity87600h(10 years)--webhook-cert-validitywebhookServer.certificates.certValidity8760h(1 year)--webhook-cert-renew-beforewebhookServer.certificates.renewBefore2160h(90 days)--webhook-cert-check-intervalwebhookServer.certificates.checkInterval12hDefault*constants (cert-controller's defaults), so unset flags keep today's behaviour.""and render no flag. The defaulthelm templateoutput is byte-identical tomain; I checked it for the default values and fornamespaceAdmission.enabled=true,webhookServer.replicas=3.certrotation.Config.Validatebefore it creates the manager, so startup fails fast (checkInterval < renewBefore < certValidity <= caValidity, each value at least 1s)."", and a chart render test.webhookServer.certificateAuthority(feat(chart): allow providing the webhook CA #642/feat(chart): keep webhook CA trust overlap during a staged rotation #659), the provided certificate sets the CA's validity andcaValiditydoes not.renewBeforereplaces the fixed "valid for more than 90 days" requirement on a provided CA.Library version
v0.1.6was tagged about three hours before #52 merged, so it doesn't includeCAValidity/CertValidity/RenewBefore/CheckInterval/Default*. This PR pins the merge commit asv0.1.7-0.20261115133234-c73236c74a81. Once av0.1.7tag exists, bump to it, either here before merge or through Dependabot.Type of Change
Checklist
API Changes
Testing
make lint: 0 issues.make helm-lintpasses.make manifests generate helm docsleaves no diff.make test: everything passes excepthack/benchmark, which fails locally only because macOSTMPDIRcontains a symlink. It passes with a non-symlinkedTMPDIRand doesn't touch this change.cmd:TestFlagDefaultspins the four defaults.TestWebhookCmdRejectsInvalidCertLifetimeschecks thatRunEreturns theValidateerror before it creates the manager.chart:TestWebhookCertificateLifetimeschecks that each value renders its flag only when set, and that the schema rejects30d,-1hand1.🤖 Generated with Claude Code