Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
Add support for registry authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitsakala committed Nov 17, 2020
1 parent a51c79c commit f6cf7c6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if .Values.global.image.credentials }}
---
apiVersion: v1
kind: Secret
type: kubernetes.io/dockerconfigjson
metadata:
name: {{ template "quarks-secret.serviceAccountName" . }}-pull-secret
namespace: {{ .Release.Namespace }}
data:
.dockerconfigjson: {{ printf "{%q:{%q:{%q:%q,%q:%q,%q:%q}}}" "auths" .Values.global.image.credentials.servername "username" .Values.global.image.credentials.username "password" .Values.global.image.credentials.password "auth" (printf "%s:%s" .Values.global.image.credentials.username .Values.global.image.credentials.password | b64enc) | b64enc }}
{{- end }}
4 changes: 4 additions & 0 deletions deploy/helm/quarks-secret/templates/service-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ kind: ServiceAccount
metadata:
name: {{ template "quarks-secret.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- if .Values.global.image.credentials }}
imagePullSecrets:
- name: {{ template "quarks-secret.serviceAccountName" . }}-pull-secret
{{- end }}
{{- end }}

{{- if .Values.global.rbac.create }}
Expand Down
4 changes: 4 additions & 0 deletions deploy/helm/quarks-secret/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ global:
image:
# pullPolicy defines the policy used for pulling docker images.
pullPolicy: IfNotPresent
credentials: ~
# username:
# password:
# servername:
# monitoredID is a string that has to match the content of the 'monitored' label in each monitored namespace.
# The monitoredID helper uses the release fullname, unless this is set.
monitoredID:

0 comments on commit f6cf7c6

Please sign in to comment.