helmify icon indicating copy to clipboard operation
helmify copied to clipboard

Webhook does not have correct certificate

Open KaiReichart opened this issue 2 years ago • 1 comments

I am trying the tool in our operator, and unfortunately it doesn't seem to inject the certificate into the ValidatingWebhookConfiguration and MutatingWebhookConfiguration correctly:

kustomize patch:

apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
  name: mutating-webhook-configuration
  annotations:
    cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)

kustomize cert:

apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: serving-cert  # this name should match the one appeared in kustomizeconfig.yaml
  namespace: kyma-operator
[...]

generated helm manifests:

kind: MutatingWebhookConfiguration
metadata:
  name: {{ include "chart.fullname" . }}-mutating-webhook-configuration
  annotations:
    cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "chart.fullname" . }}-kyma-operator/kyma-operator-serving-cert
[...]

---

apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: {{ include "chart.fullname" . }}-serving-cert
[...]

KaiReichart avatar May 31 '22 10:05 KaiReichart

Hi @KaiReichart. The issue was fixed in #42 PR. Please upgrade to v0.3.13 release containing the fix.

arttor avatar Jun 09 '22 11:06 arttor

Thanks, it works in newer releases

KaiReichart avatar Sep 13 '22 07:09 KaiReichart