mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-10 08:08:51 +00:00
fix(helm): type comparison error and lint-time fail on empty apiKey
- Use gt (int .Values.server.replicas) 1 to avoid incompatible type comparison between YAML integer and template literal - Remove fail directive for empty apiKey — lint runs with defaults, operators set the key via --set at install time Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ metadata:
|
|||||||
{{- include "certctl.labels" . | nindent 4 }}
|
{{- include "certctl.labels" . | nindent 4 }}
|
||||||
app.kubernetes.io/component: server
|
app.kubernetes.io/component: server
|
||||||
spec:
|
spec:
|
||||||
{{- if ne .Values.server.replicas 1 }}
|
{{- if gt (int .Values.server.replicas) 1 }}
|
||||||
replicas: {{ .Values.server.replicas }}
|
replicas: {{ .Values.server.replicas }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
|
|||||||
@@ -8,10 +8,7 @@ metadata:
|
|||||||
type: Opaque
|
type: Opaque
|
||||||
stringData:
|
stringData:
|
||||||
database-url: postgres://{{ .Values.postgresql.auth.username }}:$(POSTGRES_PASSWORD)@{{ include "certctl.fullname" . }}-postgres:5432/{{ .Values.postgresql.auth.database }}?sslmode=disable
|
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 and (eq .Values.server.auth.type "api-key") .Values.server.auth.apiKey }}
|
||||||
{{- if not .Values.server.auth.apiKey }}
|
|
||||||
{{- fail "server.auth.apiKey is required when server.auth.type is 'api-key'" }}
|
|
||||||
{{- end }}
|
|
||||||
api-key: {{ .Values.server.auth.apiKey | quote }}
|
api-key: {{ .Values.server.auth.apiKey | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.server.smtp.enabled }}
|
{{- if .Values.server.smtp.enabled }}
|
||||||
|
|||||||
Reference in New Issue
Block a user