mirror of
https://github.com/twuni/docker-registry.helm.git
synced 2026-02-14 12:49:51 +00:00
This commit establishes a baseline from the upstream stable/docker-registry chart
at commit b4912cc150ba284c3f593879ed04916a100d0ae6, browseable at
b4912cc150
The goal of this repo is to take over maintenance of this Helm chart and publish
it to Artifact Hub for the general public to use in lieu of the deprecated
stable/docker-registry chart.
38 lines
1.5 KiB
YAML
38 lines
1.5 KiB
YAML
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ template "docker-registry.fullname" . }}-secret
|
|
labels:
|
|
app: {{ template "docker-registry.name" . }}
|
|
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
|
heritage: {{ .Release.Service }}
|
|
release: {{ .Release.Name }}
|
|
type: Opaque
|
|
data:
|
|
{{- if .Values.secrets.htpasswd }}
|
|
htpasswd: {{ .Values.secrets.htpasswd | b64enc }}
|
|
{{- end }}
|
|
{{- if .Values.secrets.haSharedSecret }}
|
|
haSharedSecret: {{ .Values.secrets.haSharedSecret | b64enc | quote }}
|
|
{{- else }}
|
|
haSharedSecret: {{ randAlphaNum 16 | b64enc | quote }}
|
|
{{- end }}
|
|
|
|
{{- if eq .Values.storage "azure" }}
|
|
{{- if and .Values.secrets.azure.accountName .Values.secrets.azure.accountKey .Values.secrets.azure.container }}
|
|
azureAccountName: {{ .Values.secrets.azure.accountName | b64enc | quote }}
|
|
azureAccountKey: {{ .Values.secrets.azure.accountKey | b64enc | quote }}
|
|
azureContainer: {{ .Values.secrets.azure.container | b64enc | quote }}
|
|
{{- end }}
|
|
{{- else if eq .Values.storage "s3" }}
|
|
{{- if and .Values.secrets.s3.secretKey .Values.secrets.s3.accessKey }}
|
|
s3AccessKey: {{ .Values.secrets.s3.accessKey | b64enc | quote }}
|
|
s3SecretKey: {{ .Values.secrets.s3.secretKey | b64enc | quote }}
|
|
{{- end }}
|
|
{{- else if eq .Values.storage "swift" }}
|
|
{{- if and .Values.secrets.swift.username .Values.secrets.swift.password }}
|
|
swiftUsername: {{ .Values.secrets.swift.username | b64enc | quote }}
|
|
swiftPassword: {{ .Values.secrets.swift.password | b64enc | quote }}
|
|
{{- end }}
|
|
{{- end }}
|