-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Allow override of Certificate resource fields for duration of webhook certs #4105
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
Allow override of Certificate resource fields for duration of webhook certs #4105
Conversation
Welcome @usamaahmadkhan! |
Hi @usamaahmadkhan. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions 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. |
ff3f83f
to
f38c6c6
Compare
/assign @wweiwei-li |
/ok-to-test |
@wweiwei-li seems like govulncheck is failing. Let me know how to proceed. I would like to merge this ASAP. |
@@ -257,6 +257,8 @@ The default values set by the application itself can be confirmed [here](https:/ | |||
| `podDisruptionBudget` | Limit the disruption for controller pods. Require at least 2 controller replicas and 3 worker nodes | `{}` | | |||
| `updateStrategy` | Defines the update strategy for the deployment | `{}` | | |||
| `enableCertManager` | If enabled, cert-manager issues the webhook certificates instead of the helm template, requires cert-manager and it's CRDs to be installed | `false` | | |||
| `certManager.duration` | Set the expiry duration for the webhook certificates. Used only when `enableCertManager: true` | `""` | | |||
| `certManager.renewBefore` | Set the renewal time period duration for the webhook certificates. Used only when `enableCertManager: true`. If this value is greater than `certManager.duration`, it will be automatically renewed 2/3rds of the way through the certificate’s duration. | `""` | |
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.
Is this automatically renewal handled from cert-manager side?
@@ -257,6 +257,8 @@ The default values set by the application itself can be confirmed [here](https:/ | |||
| `podDisruptionBudget` | Limit the disruption for controller pods. Require at least 2 controller replicas and 3 worker nodes | `{}` | | |||
| `updateStrategy` | Defines the update strategy for the deployment | `{}` | | |||
| `enableCertManager` | If enabled, cert-manager issues the webhook certificates instead of the helm template, requires cert-manager and it's CRDs to be installed | `false` | | |||
| `certManager.duration` | Set the expiry duration for the webhook certificates. Used only when `enableCertManager: true` | `""` | |
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.
This doesn't look correct to me, if enableCertManager
is set to true
, the webhook is issued by the cert-manager instead of supplied by helm chart. so the value you try to add in helm chart won't take effect.
@@ -237,6 +237,14 @@ spec: | |||
kind: Issuer | |||
name: {{ template "aws-load-balancer-controller.namePrefix" . }}-selfsigned-issuer | |||
secretName: {{ template "aws-load-balancer-controller.webhookCertSecret" . }} | |||
{{- with .Values.certManager -}} |
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.
This manifest will only be rendered when
{{- if not $.Values.enableCertManager }}
it conflicts with your statement in README. Please clarify
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.
@oliviassss current behaviour is that If enableCertManager
is true, duration
and renewBefore
fields are not specified in the Certificate resource and the implicit behaviour of the certmanager controller is that it will issue for 90d and renew after 60d.
This change allows to override this behaviour by explicitly mentioning duration
and renewBefore
fields optionally if enableCertManager
is true
@oliviassss I have updated the description to be more precise. Let me know if it needs further improvement |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: oliviassss, surenraju-careem, usamaahmadkhan, wweiwei-li 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 |
/lgtm |
… certs (kubernetes-sigs#4105) * Allow override Certificate fields for duration * Add docs for new fields * Update documentation text to be more precise * fix typo
… certs (kubernetes-sigs#4105) * Allow override Certificate fields for duration * Add docs for new fields * Update documentation text to be more precise * fix typo
Issue
closes #4102
Description
Allow override default values of webhook certificates by templating fields
duration
andrenewBefore
Checklist
README.md
, or thedocs
directory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯