feat: Add duration and renewBefore configuration for TLS certificates#942
Merged
Skarlso merged 1 commit intoJun 10, 2026
Merged
Conversation
Without explicit duration/renewBefore fields, certificates rely on cert-manager defaults which can lead to leaf certificates outliving the root CA after renewal timing drift, causing TLS failures. Add configurable duration and renewBefore values for both the root CA and leaf certificates with sensible defaults: - Root CA: 90 days duration, renew 30 days before expiry - Leaf: 30 days duration, renew 12 days before expiry This ensures the leaf certificate is always renewed well before the root CA expires, with a 40% safety margin on the renewal window. Ref: open-component-model/ocm#1998 Signed-off-by: Melonbun233 <zeng_zh@foxmail.com>
e666f81 to
f054f2f
Compare
Skarlso
approved these changes
Jun 10, 2026
Contributor
Author
|
Hi @Skarlso , |
Contributor
|
Yes I will |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
durationandrenewBeforefields to both the root CA and leaf Certificate resources in the Helm chartMotivation
Without explicit
duration/renewBefore, certificates rely on cert-manager defaults. This can lead to a scenario where the leaf certificate's validity extends beyond the root CA's expiry — at which point the leaf is considered invalid regardless of its own NotAfter date, causing TLS failures.The defaults follow a proven pattern:
Changes
deploy/values.yaml: AddeddurationandrenewBeforeundertlsCert.bootstrap(root CA) andtlsCert(leaf)deploy/templates/cert.yaml: Render the new values into both Certificate specsTest plan
helm templatewithtlsCert.generateTlsCert=truerenders both certificates with correct duration/renewBefore valuesCloses open-component-model/ocm#1998