From 6bb261b9245e28a7b47f7cb8eeb0ddcbb065d340 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 16 Apr 2018 16:02:09 -0400 Subject: [PATCH] fixed storage: - when persistence is disabled - when using s3 storage --- contrib/helm/harbor/templates/registry/registry-cm.yaml | 4 +++- contrib/helm/harbor/templates/registry/registry-ss.yaml | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/helm/harbor/templates/registry/registry-cm.yaml b/contrib/helm/harbor/templates/registry/registry-cm.yaml index b1fd62997..1d0252187 100644 --- a/contrib/helm/harbor/templates/registry/registry-cm.yaml +++ b/contrib/helm/harbor/templates/registry/registry-cm.yaml @@ -8,7 +8,7 @@ data: config.yml: |+ version: 0.1 log: - level: info + level: {{ .Values.registry.logLevel }} fields: service: registry storage: @@ -17,8 +17,10 @@ data: {{- end }} cache: layerinfo: inmemory + {{- if not .Values.registry.objectStorage }} filesystem: rootdirectory: /var/lib/registry + {{- end }} 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 663394dd2..32031bcff 100644 --- a/contrib/helm/harbor/templates/registry/registry-ss.yaml +++ b/contrib/helm/harbor/templates/registry/registry-ss.yaml @@ -44,11 +44,9 @@ spec: mountPath: /etc/registry/config.yml subPath: config.yml volumes: -{{- if not .Values.registry.objectStorage }} -{{- if not .Values.persistence.enabled }} +{{- if or (not .Values.persistence.enabled) .Values.registry.objectStorage }} - name: registry-data emptyDir: {} -{{- end }} {{- end }} - name: registry-root-certificate secret: