From 4b09cd3ade4defb8e84e0995da5ff5510b0d2b19 Mon Sep 17 00:00:00 2001 From: lijianguo Date: Wed, 16 Mar 2022 17:39:31 +0800 Subject: [PATCH] feat(registry): add affinity --- charts/registry/templates/registry-deployment.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/charts/registry/templates/registry-deployment.yaml b/charts/registry/templates/registry-deployment.yaml index 83cc366..79e589e 100644 --- a/charts/registry/templates/registry-deployment.yaml +++ b/charts/registry/templates/registry-deployment.yaml @@ -22,6 +22,9 @@ spec: labels: app: drycc-registry spec: + {{- if .Values.global.common }} + {{- include "common.affinity" (dict "key" "app" "values" (list "drycc-registry")) | indent 6 }} + {{- end }} serviceAccount: drycc-registry initContainers: - name: drycc-registry-init @@ -70,9 +73,9 @@ spec: mountPath: /var/lib/registry - name: objectstorage-creds mountPath: /var/run/secrets/drycc/objectstore/creds - securityContext: - fsGroup: 1001 - runAsGroup: 1001 + securityContext: + fsGroup: 1001 + runAsGroup: 1001 runAsUser: 1001 volumes: - name: registry-storage