1
0
Fork 0

build(helm): add support for "easy image pull secrets"

This commit is contained in:
Vojtěch Mareš 2022-08-20 19:32:44 +02:00
parent 6a0621e8b4
commit 9d3505d299
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
3 changed files with 11 additions and 4 deletions

View file

@ -20,9 +20,9 @@ spec:
labels: labels:
{{- include "static-site.selectorLabels" . | nindent 8 }} {{- include "static-site.selectorLabels" . | nindent 8 }}
spec: spec:
{{- with .Values.imagePullSecrets }} {{- if .Values.image.pullSecretBase64 }}
imagePullSecrets: imagePullSecrets:
{{- toYaml . | nindent 8 }} - name: {{ include "static-site.fullname" . }}-registry-credentials
{{- end }} {{- end }}
serviceAccountName: {{ include "static-site.serviceAccountName" . }} serviceAccountName: {{ include "static-site.serviceAccountName" . }}
securityContext: securityContext:

View file

@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "wsj-standup.fullname" . }}-registry-credentials
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ .Values.image.pullSecretBase64 }}

View file

@ -6,11 +6,11 @@ replicaCount: 1
image: image:
repository: nginx repository: nginx
pullPolicy: IfNotPresent pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion. # Overrides the image tag whose default is the chart appVersion.
tag: '' tag: ''
pullSecretBase64: null
imagePullSecrets: []
nameOverride: '' nameOverride: ''
fullnameOverride: '' fullnameOverride: ''