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

Add support for registry authentication #81

Merged
merged 2 commits into from
Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: