diff --git a/cockroachdb/templates/job.init.yaml b/cockroachdb/templates/job.init.yaml index 92f8c90d9..3c6729f1a 100644 --- a/cockroachdb/templates/job.init.yaml +++ b/cockroachdb/templates/job.init.yaml @@ -76,7 +76,7 @@ spec: - name: client-certs mountPath: /cockroach-certs/ {{- end }} - {{- if and .Values.tls.enabled (.Values.tls.certs.provided)}} + {{- if and .Values.tls.enabled (or .Values.tls.certs.provided .Values.tls.certs.certManager )}} serviceAccountName: {{ template "cockroachdb.tls.serviceAccount.name" . }} initContainers: - name: copy-certs diff --git a/cockroachdb/templates/statefulset.yaml b/cockroachdb/templates/statefulset.yaml index ab6a30f76..34604c637 100644 --- a/cockroachdb/templates/statefulset.yaml +++ b/cockroachdb/templates/statefulset.yaml @@ -88,7 +88,7 @@ spec: - name: certs mountPath: /cockroach-certs/ {{- end }} - {{- if .Values.tls.certs.provided }} + {{- if or .Values.tls.certs.provided .Values.tls.certs.certManager }} initContainers: - name: copy-certs image: "busybox"