Skip to content

Commit

Permalink
Add a top level "auths" key to imagePullSecrets chart
Browse files Browse the repository at this point in the history
Tries to address #30
  • Loading branch information
gabibbo97 committed May 28, 2020
1 parent 33f5562 commit 4362ba7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/imagepullsecrets/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ maintainers:
- email: gabibbo97@gmail.com
name: gabibbo97
name: imagepullsecrets
version: 2.1.0
version: 3.0.0
3 changes: 2 additions & 1 deletion charts/imagepullsecrets/templates/imagepullsecrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{{- $authMessage := printf "%s:%s" $registryAuthDocument.username $registryAuthDocument.password | b64enc }}
{{- $_ := set $registryAuthDocument "auth" $authMessage }}
{{- $dockerAuthDocument := dict .Values.imagePullSecret.registryURL $registryAuthDocument }}
{{- $dockerConfigJSONDocument := dict "auths" $dockerAuthDocument -}}
---
apiVersion: v1
kind: Secret
Expand All @@ -17,6 +18,6 @@ metadata:
labels: {{- toYaml .Values.imagePullSecret.labels | nindent 4 }}
{{- end }}
data:
.dockerconfigjson: {{ $dockerAuthDocument | toJson | b64enc | quote }}
.dockerconfigjson: {{ $dockerConfigJSONDocument | toJson | b64enc | quote }}
type: kubernetes.io/dockerconfigjson
{{- end }}

0 comments on commit 4362ba7

Please sign in to comment.