diff --git a/deploy/helm/certctl/templates/server-deployment.yaml b/deploy/helm/certctl/templates/server-deployment.yaml index 7481587..a89dbf8 100644 --- a/deploy/helm/certctl/templates/server-deployment.yaml +++ b/deploy/helm/certctl/templates/server-deployment.yaml @@ -6,7 +6,7 @@ metadata: {{- include "certctl.labels" . | nindent 4 }} app.kubernetes.io/component: server spec: - {{- if ne .Values.server.replicas 1 }} + {{- if gt (int .Values.server.replicas) 1 }} replicas: {{ .Values.server.replicas }} {{- end }} selector: diff --git a/deploy/helm/certctl/templates/server-secret.yaml b/deploy/helm/certctl/templates/server-secret.yaml index a2e1aa1..316427c 100644 --- a/deploy/helm/certctl/templates/server-secret.yaml +++ b/deploy/helm/certctl/templates/server-secret.yaml @@ -8,10 +8,7 @@ metadata: type: Opaque stringData: database-url: postgres://{{ .Values.postgresql.auth.username }}:$(POSTGRES_PASSWORD)@{{ include "certctl.fullname" . }}-postgres:5432/{{ .Values.postgresql.auth.database }}?sslmode=disable - {{- if eq .Values.server.auth.type "api-key" }} - {{- if not .Values.server.auth.apiKey }} - {{- fail "server.auth.apiKey is required when server.auth.type is 'api-key'" }} - {{- end }} + {{- if and (eq .Values.server.auth.type "api-key") .Values.server.auth.apiKey }} api-key: {{ .Values.server.auth.apiKey | quote }} {{- end }} {{- if .Values.server.smtp.enabled }}