Merge pull request #4769 from draeron/helm/fix-volume

[Chart] Fix registry storage config issue
This commit is contained in:
Jesse Hu 2018-04-26 11:56:52 +08:00 committed by GitHub
commit eedbc830ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 13 deletions

View File

@ -8,17 +8,18 @@ data:
config.yml: |+
version: 0.1
log:
level: info
level: {{ .Values.registry.logLevel }}
fields:
service: registry
storage:
{{- if .Values.registry.objectStorage }}
{{ toYaml .Values.registry.objectStorage | indent 6 }}
{{- else }}
filesystem:
rootdirectory: /var/lib/registry
{{- end }}
cache:
layerinfo: inmemory
filesystem:
rootdirectory: /var/lib/registry
maintenance:
uploadpurging:
enabled: false

View File

@ -35,8 +35,10 @@ spec:
- containerPort: 5000
- containerPort: 5001
volumeMounts:
{{- if not .Values.registry.objectStorage }}
- name: registry-data
mountPath: /var/lib/registry
{{- end }}
- name: registry-root-certificate
mountPath: /etc/registry/root.crt
subPath: root.crt
@ -44,20 +46,13 @@ spec:
mountPath: /etc/registry/config.yml
subPath: config.yml
volumes:
{{- if not .Values.registry.objectStorage }}
{{- if not .Values.persistence.enabled }}
- name: registry-data
emptyDir: {}
{{- end }}
{{- end }}
- name: registry-root-certificate
secret:
secretName: "{{ template "harbor.fullname" . }}-registry"
- name: registry-config
configMap:
name: "{{ template "harbor.fullname" . }}-registry"
{{- if not .Values.registry.objectStorage }}
{{- if .Values.persistence.enabled }}
{{- if and (not .Values.registry.objectStorage) .Values.persistence.enabled }}
volumeClaimTemplates:
- metadata:
name: "registry-data"
@ -76,4 +71,3 @@ spec:
requests:
storage: {{ .Values.registry.volumes.data.size | quote }}
{{- end -}}
{{- end -}}

View File

@ -198,7 +198,7 @@ registry:
tag: v2.6.2-v1.4.0
pullPolicy: IfNotPresent
httpSecret: not-a-secure-secret
logLevel:
logLevel: info
# comment out one of the below to use your cloud's object storage.
# objectStorage:
# gcs: