-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
✨ feat: add webhook CertWatcher and flags for custom certificate configuration #4429
✨ feat: add webhook CertWatcher and flags for custom certificate configuration #4429
Conversation
camilamacedo86
commented
Dec 14, 2024
- Introduced CertWatcher for webhook server to dynamically reload certificates.
- Added CLI flags (--webhook-cert-path, --webhook-cert-name, --webhook-cert-key) to allow users to provide custom certificate paths.
- Updated manager to integrate CertWatcher into webhook TLS options.
- Ensured backward compatibility with default self-signed certificates if no custom certs are provided.
…uration - Introduced CertWatcher for webhook server to dynamically reload certificates. - Added CLI flags (--webhook-cert-path, --webhook-cert-name, --webhook-cert-key) to allow users to provide custom certificate paths. - Updated manager to integrate CertWatcher into webhook TLS options. - Ensured backward compatibility with default self-signed certificates if no custom certs are provided.
1421b14
to
489145d
Compare
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.
Just one nit, rest looks good!
Thanks @camilamacedo86!
/lgtm
var webhookCertWatcher *certwatcher.CertWatcher | ||
|
||
// Initial webhook TLS options | ||
webhookTLSOpts := append([]func(*tls.Config){}, tlsOpts...) |
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.
nit:
webhookTLSOpts := append([]func(*tls.Config){}, tlsOpts...) | |
webhookTLSOpts := tlsOpts |
as the slice is already initialised in line 84, and we should be able to append to it.
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.
Done that here: https://github.com/kubernetes-sigs/kubebuilder/pull/4400/files
Where we put all together and shape things
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, varshaprasad96 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |