From f8f45e0110a26d7327218183e62f8d3ea2d2fb83 Mon Sep 17 00:00:00 2001 From: Ye Cao Date: Mon, 24 Apr 2023 18:38:49 +0800 Subject: [PATCH] Add the enable-certificate-owner-ref to the subchart of cert-manager. (#1341) As titled. After uninstalling the vineyard operator, the secret for related webhooks will be deleted automatically. Signed-off-by: Ye Cao --- charts/vineyard-operator/values.yaml | 2 ++ k8s/Makefile | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/vineyard-operator/values.yaml b/charts/vineyard-operator/values.yaml index 6611bb723..e743095db 100644 --- a/charts/vineyard-operator/values.yaml +++ b/charts/vineyard-operator/values.yaml @@ -1,6 +1,8 @@ cert-manager: enabled: true installCRDs: true + extraArgs: + - --enable-certificate-owner-ref=true controllerManager: kubeRbacProxy: containerSecurityContext: diff --git a/k8s/Makefile b/k8s/Makefile index 7273c38e7..bb15d1d7b 100644 --- a/k8s/Makefile +++ b/k8s/Makefile @@ -272,4 +272,8 @@ generate-helm-chart: helmify kustomize cd ../charts && $(KUSTOMIZE) build ../k8s/config/default | $(HELMIFY) --cert-manager-as-subchart vineyard-operator && \ sed -i 's/\/var\/run\/vineyard-kubernetes\/{{.Namespace}}\/{{.Name}}/\/var\/run\/vineyard-kubernetes\/{{ \"{{.Namespace}}\/{{.Name}}\" }}/g' \ vineyard-operator/templates/vineyardd-crd.yaml && \ - sed -i 's/certManager/cert-manager/g' vineyard-operator/values.yaml + sed -i 's/certManager/cert-manager/g' vineyard-operator/values.yaml && \ + sed -i '4i\ extraArgs:\n - --enable-certificate-owner-ref=true' vineyard-operator/values.yaml + + +