diff --git a/deploy/charts/version-checker/templates/deployment.yaml b/deploy/charts/version-checker/templates/deployment.yaml index 5cb8087..b2a1df8 100644 --- a/deploy/charts/version-checker/templates/deployment.yaml +++ b/deploy/charts/version-checker/templates/deployment.yaml @@ -8,7 +8,7 @@ kind: Deployment metadata: name: {{ $chartname }} labels: - {{ include "version-checker.labels" . | nindent 4 }} + {{- include "version-checker.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: @@ -107,7 +107,6 @@ spec: name: {{ $chartname }} key: ecr.accessKeyID {{- end -}} - {{- if .Values.ecr.secretAccessKey }} - name: VERSION_CHECKER_ECR_SECRET_ACCESS_KEY valueFrom: @@ -122,7 +121,6 @@ spec: name: {{ $chartname }} key: ecr.sessionToken {{- end -}} - {{- if .Values.docker.token }} # Docker - name: VERSION_CHECKER_DOCKER_TOKEN @@ -145,7 +143,6 @@ spec: name: {{ $chartname }} key: docker.password {{- end -}} - {{- if .Values.gcr.token }} # GCR - name: VERSION_CHECKER_GCR_TOKEN @@ -153,8 +150,7 @@ spec: secretKeyRef: name: {{ $chartname }} key: gcr.token - {{- end }} - + {{- end -}} {{- if .Values.ghcr.token }} # GHCR - name: VERSION_CHECKER_GHCR_TOKEN @@ -163,7 +159,6 @@ spec: name: {{ $chartname }} key: ghcr.token {{- end -}} - {{- if .Values.quay.token }} # Quay - name: VERSION_CHECKER_QUAY_TOKEN @@ -172,7 +167,6 @@ spec: name: {{ $chartname }} key: quay.token {{- end -}} - {{range $index, $element := .Values.selfhosted }} # Selfhosted {{- if $element.host }} @@ -181,38 +175,38 @@ spec: secretKeyRef: name: {{ $chartname }} key: selfhosted.{{ $element.name }}.host - {{- end }} + {{- end -}} {{- if $element.username }} - name: VERSION_CHECKER_SELFHOSTED_USERNAME_{{ $element.name }} valueFrom: secretKeyRef: name: {{ $chartname }} key: selfhosted.{{ $element.name }}.username - {{- end }} + {{- end -}} {{- if $element.password }} - name: VERSION_CHECKER_SELFHOSTED_PASSWORD_{{ $element.name }} valueFrom: secretKeyRef: name: {{ $chartname }} key: selfhosted.{{ $element.name }}.password - {{- end }} + {{- end -}} {{- if $element.token }} - name: VERSION_CHECKER_SELFHOSTED_TOKEN_{{ $element.name }} valueFrom: secretKeyRef: name: {{ $chartname }} key: selfhosted.{{ $element.name }}.token - {{- end }} - {{- end }} + {{- end -}} + {{- end -}} {{- if .Values.env }} {{- toYaml .Values.env | nindent 8 }} - {{- end }} + {{- end -}} {{- with .Values.podSecurityContext }} securityContext: {{- toYaml . | nindent 8 }} {{- end }} + {{- if $secretEnabled }} volumes: - {{- if $secretEnabled }} - name: {{ include "version-checker.name" . }} secret: secretName: {{ include "version-checker.name" . }}