build(helm): add support for "easy image pull secrets"
This commit is contained in:
parent
6a0621e8b4
commit
9d3505d299
3 changed files with 11 additions and 4 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
7
deploy/charts/static-site/templates/registry-secret.yaml
Normal file
7
deploy/charts/static-site/templates/registry-secret.yaml
Normal 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 }}
|
||||||
|
|
@ -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: ''
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue