diff --git a/contrib/helm/harbor/templates/registry/registry-cm.yaml b/contrib/helm/harbor/templates/registry/registry-cm.yaml index 1d0252187..9d470e038 100644 --- a/contrib/helm/harbor/templates/registry/registry-cm.yaml +++ b/contrib/helm/harbor/templates/registry/registry-cm.yaml @@ -14,13 +14,12 @@ data: storage: {{- if .Values.registry.objectStorage }} {{ toYaml .Values.registry.objectStorage | indent 6 }} - {{- end }} - cache: - layerinfo: inmemory - {{- if not .Values.registry.objectStorage }} + {{- else }} filesystem: rootdirectory: /var/lib/registry {{- end }} + cache: + layerinfo: inmemory maintenance: uploadpurging: enabled: false diff --git a/contrib/helm/harbor/templates/registry/registry-ss.yaml b/contrib/helm/harbor/templates/registry/registry-ss.yaml index 32031bcff..7231c4834 100644 --- a/contrib/helm/harbor/templates/registry/registry-ss.yaml +++ b/contrib/helm/harbor/templates/registry/registry-ss.yaml @@ -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,18 +46,13 @@ spec: mountPath: /etc/registry/config.yml subPath: config.yml volumes: -{{- if or (not .Values.persistence.enabled) .Values.registry.objectStorage }} - - name: registry-data - emptyDir: {} -{{- 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" @@ -74,4 +71,3 @@ spec: requests: storage: {{ .Values.registry.volumes.data.size | quote }} {{- end -}} - {{- end -}} diff --git a/contrib/helm/harbor/values.yaml b/contrib/helm/harbor/values.yaml index 072ab80cc..3ebec0079 100644 --- a/contrib/helm/harbor/values.yaml +++ b/contrib/helm/harbor/values.yaml @@ -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: