refactor(deploy): use external (hand-made) image pull secret
This commit is contained in:
parent
b0437179d0
commit
daedf8af04
5 changed files with 8 additions and 23 deletions
|
|
@ -1,5 +0,0 @@
|
||||||
{{- define "imagePullSecret" }}
|
|
||||||
{{- with .Values.imageCredentials }}
|
|
||||||
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
@ -29,8 +29,10 @@ spec:
|
||||||
app.kubernetes.io/component: "backend-api"
|
app.kubernetes.io/component: "backend-api"
|
||||||
spec:
|
spec:
|
||||||
automountServiceAccountToken: false
|
automountServiceAccountToken: false
|
||||||
|
{{- with .Values.image.pullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: {{ .Release.Name }}-pull-secret
|
{{ toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: {{ .Release.Name }}-pull-secret
|
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": pre-install
|
|
||||||
"helm.sh/hook-weight": "-99"
|
|
||||||
"helm.sh/hook-delete-policy": before-hook-creation
|
|
||||||
type: kubernetes.io/dockerconfigjson
|
|
||||||
data:
|
|
||||||
.dockerconfigjson: {{ template "imagePullSecret" . }}
|
|
||||||
|
|
@ -5,3 +5,7 @@ ingress:
|
||||||
cert-manager.io/cluster-issuer: letsencrypt-dns-production
|
cert-manager.io/cluster-issuer: letsencrypt-dns-production
|
||||||
|
|
||||||
replicas: 2
|
replicas: 2
|
||||||
|
|
||||||
|
image:
|
||||||
|
pullSecrets:
|
||||||
|
- name: mareshq-gitlab-registry
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,10 @@
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
|
||||||
image:
|
image:
|
||||||
|
pullSecrets: []
|
||||||
repository: registry.mareshq.com/hq/yggdrasil/httpserver
|
repository: registry.mareshq.com/hq/yggdrasil/httpserver
|
||||||
tag: latest
|
tag: latest
|
||||||
|
|
||||||
imageCredentials:
|
|
||||||
registry: registry.mareshq.com
|
|
||||||
email: nobody@mareshq.com
|
|
||||||
username: someone
|
|
||||||
password: sillyness
|
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: false
|
enabled: false
|
||||||
host: example.com
|
host: example.com
|
||||||
|
|
|
||||||
Reference in a new issue