
This PS adds harbor-helm [0] [0] https://github.com/goharbor/harbor-helm Change-Id: I0bbef1f3504bc1fe51e2dc50b071cb1acb00734d
36 lines
1.5 KiB
YAML
36 lines
1.5 KiB
YAML
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: "{{ template "harbor.registry" . }}"
|
|
labels:
|
|
{{ include "harbor.labels" . | indent 4 }}
|
|
type: Opaque
|
|
data:
|
|
REGISTRY_HTPASSWD: {{ .Values.registry.credentials.htpasswd | b64enc | quote }}
|
|
REGISTRY_HTTP_SECRET: {{ .Values.registry.secret | default (randAlphaNum 16) | b64enc | quote }}
|
|
REGISTRY_REDIS_PASSWORD: {{ (include "harbor.redis.password" .) | b64enc | quote }}
|
|
{{- $storage := .Values.persistence.imageChartStorage }}
|
|
{{- $type := $storage.type }}
|
|
{{- if eq $type "azure" }}
|
|
REGISTRY_STORAGE_AZURE_ACCOUNTKEY: {{ $storage.azure.accountkey | b64enc | quote }}
|
|
{{- else if eq $type "gcs" }}
|
|
GCS_KEY_DATA: {{ $storage.gcs.encodedkey | quote }}
|
|
{{- else if eq $type "s3" }}
|
|
{{- if $storage.s3.accesskey }}
|
|
REGISTRY_STORAGE_S3_ACCESSKEY: {{ $storage.s3.accesskey | b64enc | quote }}
|
|
{{- end }}
|
|
{{- if $storage.s3.secretkey }}
|
|
REGISTRY_STORAGE_S3_SECRETKEY: {{ $storage.s3.secretkey | b64enc | quote }}
|
|
{{- end }}
|
|
{{- else if eq $type "swift" }}
|
|
REGISTRY_STORAGE_SWIFT_PASSWORD: {{ $storage.swift.password | b64enc | quote }}
|
|
{{- if $storage.swift.secretkey }}
|
|
REGISTRY_STORAGE_SWIFT_SECRETKEY: {{ $storage.swift.secretkey | b64enc | quote }}
|
|
{{- end }}
|
|
{{- if $storage.swift.accesskey }}
|
|
REGISTRY_STORAGE_SWIFT_ACCESSKEY: {{ $storage.swift.accesskey | b64enc | quote }}
|
|
{{- end }}
|
|
{{- else if eq $type "oss" }}
|
|
REGISTRY_STORAGE_OSS_ACCESSKEYSECRET: {{ $storage.oss.accesskeysecret | b64enc | quote }}
|
|
{{- end }}
|