Browse Source

do not deploy certController when certManager is enabled by webhook (#2952)

Signed-off-by: kaldorn <nate.kaldor@outreach.io>
Nate Kaldor 2 years ago
parent
commit
371b18fd08

+ 1 - 1
deploy/charts/external-secrets/templates/cert-controller-deployment.yaml

@@ -1,4 +1,4 @@
-{{- if .Values.certController.create }}
+{{- if and .Values.certController.create (not .Values.webhook.certManager.enable) }}
 apiVersion: apps/v1
 kind: Deployment
 metadata:

+ 2 - 2
deploy/charts/external-secrets/templates/cert-controller-poddisruptionbudget.yaml

@@ -1,4 +1,4 @@
-{{- if and .Values.certController.create .Values.certController.podDisruptionBudget.enabled }}
+{{- if and .Values.certController.create .Values.certController.podDisruptionBudget.enabled (not .Values.webhook.certManager.enabled) }}
 apiVersion: policy/v1
 kind: PodDisruptionBudget
 metadata:
@@ -16,4 +16,4 @@ spec:
   selector:
     matchLabels:
       {{- include "external-secrets-cert-controller.selectorLabels" . | nindent 6 }}
-{{- end }}
+{{- end }}

+ 1 - 1
deploy/charts/external-secrets/templates/cert-controller-rbac.yaml

@@ -1,4 +1,4 @@
-{{- if and .Values.certController.create .Values.certController.rbac.create -}}
+{{- if and .Values.certController.create .Values.certController.rbac.create (not .Values.webhook.certManager.enabled) -}}
 apiVersion: rbac.authorization.k8s.io/v1
 kind: ClusterRole
 metadata:

+ 1 - 1
deploy/charts/external-secrets/templates/cert-controller-service.yaml

@@ -1,4 +1,4 @@
-{{- if and .Values.certController.create .Values.certController.metrics.service.enabled }}
+{{- if and .Values.certController.create .Values.certController.metrics.service.enabled (not .Values.webhook.certManager.enabled) }}
 apiVersion: v1
 kind: Service
 metadata:

+ 1 - 1
deploy/charts/external-secrets/templates/cert-controller-serviceaccount.yaml

@@ -1,4 +1,4 @@
-{{- if and .Values.certController.create .Values.certController.serviceAccount.create -}}
+{{- if and .Values.certController.create .Values.certController.serviceAccount.create (not .Values.webhook.certManager.enabled) -}}
 apiVersion: v1
 kind: ServiceAccount
 metadata: