diff --git a/deploy/templates/_helpers.tpl b/deploy/templates/_helpers.tpl deleted file mode 100644 index 86678f3..0000000 --- a/deploy/templates/_helpers.tpl +++ /dev/null @@ -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 }} diff --git a/deploy/templates/deployment.yaml b/deploy/templates/deployment.yaml index 17b5873..e9cd028 100644 --- a/deploy/templates/deployment.yaml +++ b/deploy/templates/deployment.yaml @@ -29,8 +29,10 @@ spec: app.kubernetes.io/component: "backend-api" spec: automountServiceAccountToken: false + {{- with .Values.image.pullSecrets }} imagePullSecrets: - - name: {{ .Release.Name }}-pull-secret + {{ toYaml . | nindent 8 }} + {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/deploy/templates/image-pull-secret.yaml b/deploy/templates/image-pull-secret.yaml deleted file mode 100644 index cf9ee50..0000000 --- a/deploy/templates/image-pull-secret.yaml +++ /dev/null @@ -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" . }} diff --git a/deploy/values.staging.yaml b/deploy/values.staging.yaml index 61b13cb..2fa7bba 100644 --- a/deploy/values.staging.yaml +++ b/deploy/values.staging.yaml @@ -5,3 +5,7 @@ ingress: cert-manager.io/cluster-issuer: letsencrypt-dns-production replicas: 2 + +image: + pullSecrets: + - name: mareshq-gitlab-registry diff --git a/deploy/values.yaml b/deploy/values.yaml index 60e0dc8..d445df3 100644 --- a/deploy/values.yaml +++ b/deploy/values.yaml @@ -1,15 +1,10 @@ replicas: 1 image: + pullSecrets: [] repository: registry.mareshq.com/hq/yggdrasil/httpserver tag: latest -imageCredentials: - registry: registry.mareshq.com - email: nobody@mareshq.com - username: someone - password: sillyness - ingress: enabled: false host: example.com