Skip to content
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(helm): Allow external TLS provider for webhook #420

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anael-l
Copy link

@anael-l anael-l commented Aug 19, 2024

closes: #407

Added a new parameter app.webhook.tls.certManager.enabled=true that keeps the default config to create certmanager certificates, but that can be disabled.

Added new parameters app.webhook.annotations and app.webhook.service.annotations to set annotations for the ValidatingWebhookConfiguration and Webhook Service respectively.

This allows for having another way to provide TLS certificates like for instance wih the Openshift service serving certificates

Example values:

app:
  webhook:
    annotations:
      service.beta.openshift.io/inject-cabundle: "true"
    service:
      annotations:
        service.beta.openshift.io/serving-cert-secret-name: '{{ include "trust-manager.name" . }}-tls'
    tls:
      helmCert:
        enabled: false
      certManager:
        enabled: false

@cert-manager-prow cert-manager-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Aug 19, 2024
@cert-manager-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign inteon for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 19, 2024
@cert-manager-prow
Copy link
Contributor

Hi @anael-l. Thanks for your PR.

I'm waiting for a cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@cert-manager-prow cert-manager-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 19, 2024
@@ -1,4 +1,4 @@
{{- if not .Values.app.webhook.tls.helmCert.enabled -}}
{{- if .Values.app.webhook.tls.certManager.enabled -}}
Copy link
Contributor

@erikgb erikgb Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears like a breaking change. Is it intentional? If possible, I think we should still support the app.webhook.tls.helmCert.enabled Helm value.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the app.webhook.tls.helmCert.enabled still works, but for for existing installation, the app.webhook.tls.certManager.enabled var would have to be set to false, which indeed is a breaking change.

Should we have instead a app.webhook.tls.externalProvider.enabled=false var that when enabled, disables the cert-manager certficates creation ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this will work, but could it be an option to add a new optional Helm value to set the name of the webhook certificate secret? And when user sets this value, all use of cert-manager or Helm to generate a webhook certificate is turned off?

@cert-manager-prow cert-manager-prow bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 6, 2024
@cert-manager-prow
Copy link
Contributor

PR needs rebase.

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.

germanattanasio added a commit to germanattanasio/trust-manager that referenced this pull request Dec 13, 2024
…al TLS provider for webhook cert-manager#420

* Reuse an existing service account if needed
* Configure `automountServiceAccountToken` for the pod and service account
* Allow volumes to be defined and mounted in the main container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support other ways to generate service TLS certificate in the Helm chart
2 participants