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

Can we omit this annotation entirely if .Values.admissionWebhooks.certManager.enabled=false instead of setting it to none? #1177

Open
TylerHelmuth opened this issue May 9, 2024 · 6 comments
Labels
chart:operator Issue related to opentelemetry-operator helm chart help wanted Extra attention is needed

Comments

@TylerHelmuth
Copy link
Member

          Can we omit this annotation entirely if `.Values.admissionWebhooks.certManager.enabled=false` instead of setting it to `none`?

Originally posted by @TylerHelmuth in #1175 (comment)

@TylerHelmuth TylerHelmuth added chart:operator Issue related to opentelemetry-operator helm chart good first issue Good for newcomers help wanted Extra attention is needed labels May 9, 2024
@suyash-811
Copy link

Hey, i would like to work on this issue.

@TylerHelmuth
Copy link
Member Author

TylerHelmuth commented May 11, 2024

@suyash-811 Great, we should wait until #1176 is merged.

@suyash-811
Copy link

Just saw that the PR merged. I'll update the helm template to add the cert-manager annotation if .Values.admissionWebhooks.certManager.enabled=false

@suyash-811
Copy link

I took a look at the template admission-webhooks/operator-webhook-with-cert-manager.yaml. There is an ifblock at the start of the file which also uses the same field from the values file to generate the Webhook configurations (.Values.admissionWebhooks.certManager.enabled).

{{- if and (.Values.admissionWebhooks.create) (.Values.admissionWebhooks.certManager.enabled) }}
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
annotations:
cert-manager.io/inject-ca-from: {{ include "opentelemetry-operator.webhookCertAnnotation" . }}

Thus, i am a bit unsure if this is the file that really needs the change, as the file isnt rendered at all when the cert-manager admissionWebhook is disabled. Or maybe i got something wrong? Either way, looking forward to some feedback!

@TylerHelmuth
Copy link
Member Author

@suyash-811 Look for the other places that use the opentelemetry-operator.webhookCertAnnotation helper template. I believe instead of setting none we can add more template logic to conditionally add the annotation.

This is going to break make update-operator-crds and make check-operator-crds and maybe shouldn't be done until we've got a better way to keep the CRD templates up to date.

@TylerHelmuth TylerHelmuth removed the good first issue Good for newcomers label May 13, 2024
@suyash-811
Copy link

Ah i see. I'll prepare a PR for this. It can be merged once CRD management is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart:operator Issue related to opentelemetry-operator helm chart help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants