From 8396194272c76d0c220b698fc7f4cc86fb017bc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20GLON?= Date: Mon, 4 Dec 2023 16:59:12 +0100 Subject: [PATCH 1/7] fix(msqsql): set statefulset servicename --- charts/self-host/templates/mssql.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/self-host/templates/mssql.yaml b/charts/self-host/templates/mssql.yaml index 088b3927..609e2507 100644 --- a/charts/self-host/templates/mssql.yaml +++ b/charts/self-host/templates/mssql.yaml @@ -13,6 +13,7 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: + serviceName: {{ template "bitwarden.mssql" . }} replicas: 1 updateStrategy: type: "{{ .Values.database.updateStrategy }}" From 3dcbbe9a7b95dab1487f41de7a050036d3bbf4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20GLON?= Date: Mon, 4 Dec 2023 17:13:15 +0100 Subject: [PATCH 2/7] Fix duplicate field on scim --- charts/self-host/templates/scim.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/self-host/templates/scim.yaml b/charts/self-host/templates/scim.yaml index 0a615211..1da39041 100644 --- a/charts/self-host/templates/scim.yaml +++ b/charts/self-host/templates/scim.yaml @@ -66,7 +66,6 @@ spec: ports: - containerPort: 5000 resources: - resources: {{ toYaml .Values.component.scim.resources | indent 10 }} volumeMounts: - name: attachments From 4ae8b46c3b8ea046f53b8094d24cb094303b1fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20GLON?= Date: Mon, 4 Dec 2023 17:33:06 +0100 Subject: [PATCH 3/7] feat: add co location on ReadWriteOnce storage --- .../templates/pre-install-db-migrator-job.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/charts/self-host/templates/pre-install-db-migrator-job.yaml b/charts/self-host/templates/pre-install-db-migrator-job.yaml index e113657b..26c653cb 100644 --- a/charts/self-host/templates/pre-install-db-migrator-job.yaml +++ b/charts/self-host/templates/pre-install-db-migrator-job.yaml @@ -20,6 +20,16 @@ spec: labels: app.kubernetes.io/component: pre-install-db-migrator-job spec: + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "bitwarden.mssql" . }} + topologyKey: "kubernetes.io/hostname" {{- if .Values.serviceAccount.name }} serviceAccountName: "{{ .Values.serviceAccount.name }}" {{- end }} From bfb4345bd0f6071408c757aa63fad9786fa8f9a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20GLON?= Date: Mon, 4 Dec 2023 18:09:24 +0100 Subject: [PATCH 4/7] x --- .../templates/post-install-db-migrator-job.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/charts/self-host/templates/post-install-db-migrator-job.yaml b/charts/self-host/templates/post-install-db-migrator-job.yaml index ed9a1188..1b8127be 100644 --- a/charts/self-host/templates/post-install-db-migrator-job.yaml +++ b/charts/self-host/templates/post-install-db-migrator-job.yaml @@ -16,6 +16,18 @@ spec: labels: app.kubernetes.io/component: post-install-db-migrator-job spec: + {{- if .Values.database.enabled }} + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "bitwarden.mssql" . }} + topologyKey: "kubernetes.io/hostname" + {{ end }} {{- if .Values.serviceAccount.name }} serviceAccountName: "{{ .Values.serviceAccount.name }}" {{- end }} From 398f0a08bfa3855c23a1e62fed591161a987c770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20GLON?= Date: Mon, 4 Dec 2023 19:32:30 +0100 Subject: [PATCH 5/7] improve compatibility --- charts/self-host/templates/post-install-db-migrator-job.yaml | 4 ++-- charts/self-host/templates/pre-install-db-migrator-job.yaml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/self-host/templates/post-install-db-migrator-job.yaml b/charts/self-host/templates/post-install-db-migrator-job.yaml index 1b8127be..48250172 100644 --- a/charts/self-host/templates/post-install-db-migrator-job.yaml +++ b/charts/self-host/templates/post-install-db-migrator-job.yaml @@ -16,7 +16,7 @@ spec: labels: app.kubernetes.io/component: post-install-db-migrator-job spec: - {{- if .Values.database.enabled }} + {{- if and (.Values.database.enabled) ( eq (.Values.general.volumeAccessMode "ReadWriteOnce") }} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -27,7 +27,7 @@ spec: values: - {{ template "bitwarden.mssql" . }} topologyKey: "kubernetes.io/hostname" - {{ end }} + {{- end }} {{- if .Values.serviceAccount.name }} serviceAccountName: "{{ .Values.serviceAccount.name }}" {{- end }} diff --git a/charts/self-host/templates/pre-install-db-migrator-job.yaml b/charts/self-host/templates/pre-install-db-migrator-job.yaml index 26c653cb..976c90bc 100644 --- a/charts/self-host/templates/pre-install-db-migrator-job.yaml +++ b/charts/self-host/templates/pre-install-db-migrator-job.yaml @@ -20,6 +20,7 @@ spec: labels: app.kubernetes.io/component: pre-install-db-migrator-job spec: + {{- if and (.Values.database.enabled) ( eq (.Values.general.volumeAccessMode "ReadWriteOnce") }} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -30,6 +31,7 @@ spec: values: - {{ template "bitwarden.mssql" . }} topologyKey: "kubernetes.io/hostname" + {{- end }} {{- if .Values.serviceAccount.name }} serviceAccountName: "{{ .Values.serviceAccount.name }}" {{- end }} From 6e484b220989a82d0de00e0dc02073399e63d200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20GLON?= Date: Tue, 5 Dec 2023 09:46:17 +0100 Subject: [PATCH 6/7] Add afinity pod co location on ReadWriteOnce storage --- charts/self-host/templates/admin.yaml | 2 ++ charts/self-host/templates/api.yaml | 1 + charts/self-host/templates/attachments.yaml | 1 + charts/self-host/templates/events.yaml | 1 + charts/self-host/templates/helpers.tpl | 19 +++++++++++++++++++ charts/self-host/templates/icons.yaml | 1 + charts/self-host/templates/identity.yaml | 1 + charts/self-host/templates/notifications.yaml | 1 + charts/self-host/templates/scim.yaml | 1 + charts/self-host/templates/sso.yaml | 1 + 10 files changed, 29 insertions(+) diff --git a/charts/self-host/templates/admin.yaml b/charts/self-host/templates/admin.yaml index 62133132..1e4ed87a 100644 --- a/charts/self-host/templates/admin.yaml +++ b/charts/self-host/templates/admin.yaml @@ -7,11 +7,13 @@ metadata: labels: app.kubernetes.io/component: admin app: {{ template "bitwarden.admin" . }} + {{ include "bitwarden.labels" . | indent 4 }} {{- with .Values.component.admin.labels }} {{ toYaml . | indent 4 }} {{- end }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.admin.deploymentStrategy }}" diff --git a/charts/self-host/templates/api.yaml b/charts/self-host/templates/api.yaml index d01e1ab9..3aedd755 100644 --- a/charts/self-host/templates/api.yaml +++ b/charts/self-host/templates/api.yaml @@ -12,6 +12,7 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.api.deploymentStrategy }}" diff --git a/charts/self-host/templates/attachments.yaml b/charts/self-host/templates/attachments.yaml index ed207511..7aa6a82c 100644 --- a/charts/self-host/templates/attachments.yaml +++ b/charts/self-host/templates/attachments.yaml @@ -12,6 +12,7 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.attachments.deploymentStrategy }}" diff --git a/charts/self-host/templates/events.yaml b/charts/self-host/templates/events.yaml index de9b1798..ce2a8990 100644 --- a/charts/self-host/templates/events.yaml +++ b/charts/self-host/templates/events.yaml @@ -12,6 +12,7 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.events.deploymentStrategy }}" diff --git a/charts/self-host/templates/helpers.tpl b/charts/self-host/templates/helpers.tpl index 3719adc3..da8674e9 100644 --- a/charts/self-host/templates/helpers.tpl +++ b/charts/self-host/templates/helpers.tpl @@ -65,6 +65,9 @@ app.kubernetes.io/name: {{ template "bitwarden.name" . }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} helm.sh/chart: {{ template "bitwarden.chart" . }} +{{- if eq (.Values.general.volumeAccessMode "ReadWriteOnce") }} +app.kubernetes.io/storage: "ReadWriteOnce" +{{- end -}} {{- if .Values.general.labels }} {{ toYaml .Values.general.labels }} {{- end -}} @@ -238,3 +241,19 @@ Name of SCIM components {{- define "bitwarden.scim" -}} {{ template "bitwarden.fullname" . }}-scim {{- end -}} + + +{{- define "bitwarden.podCoLocation.affinity" -}} +{{- if eq (.Values.general.volumeAccessMode "ReadWriteOnce") }} +affinity: +podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app.kubernetes.io/storage + operator: In + values: + - ReadWriteOnce + topologyKey: "kubernetes.io/hostname" +{{- end -}} +{{- end -}} diff --git a/charts/self-host/templates/icons.yaml b/charts/self-host/templates/icons.yaml index 60e21242..7e433561 100644 --- a/charts/self-host/templates/icons.yaml +++ b/charts/self-host/templates/icons.yaml @@ -12,6 +12,7 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.icons.deploymentStrategy }}" diff --git a/charts/self-host/templates/identity.yaml b/charts/self-host/templates/identity.yaml index 17690c38..5687d667 100644 --- a/charts/self-host/templates/identity.yaml +++ b/charts/self-host/templates/identity.yaml @@ -12,6 +12,7 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.identity.deploymentStrategy }}" diff --git a/charts/self-host/templates/notifications.yaml b/charts/self-host/templates/notifications.yaml index 77409dfc..d9f643e9 100644 --- a/charts/self-host/templates/notifications.yaml +++ b/charts/self-host/templates/notifications.yaml @@ -12,6 +12,7 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.notifications.deploymentStrategy }}" diff --git a/charts/self-host/templates/scim.yaml b/charts/self-host/templates/scim.yaml index 4c8ef65a..e6614896 100644 --- a/charts/self-host/templates/scim.yaml +++ b/charts/self-host/templates/scim.yaml @@ -12,6 +12,7 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.scim.deploymentStrategy }}" diff --git a/charts/self-host/templates/sso.yaml b/charts/self-host/templates/sso.yaml index f1b7791f..51c4fcdf 100644 --- a/charts/self-host/templates/sso.yaml +++ b/charts/self-host/templates/sso.yaml @@ -12,6 +12,7 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.sso.deploymentStrategy }}" From 02009ea4a009470ff8665879d539dcdb654e8251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20GLON?= Date: Tue, 5 Dec 2023 09:55:19 +0100 Subject: [PATCH 7/7] fix --- charts/self-host/templates/admin.yaml | 2 +- charts/self-host/templates/api.yaml | 1 - charts/self-host/templates/attachments.yaml | 3 ++- charts/self-host/templates/events.yaml | 3 ++- charts/self-host/templates/helpers.tpl | 20 +++++++++---------- charts/self-host/templates/icons.yaml | 2 +- charts/self-host/templates/identity.yaml | 2 +- charts/self-host/templates/notifications.yaml | 2 +- .../post-install-db-migrator-job.yaml | 2 +- .../pre-install-db-migrator-job.yaml | 2 +- charts/self-host/templates/scim.yaml | 2 +- charts/self-host/templates/sso.yaml | 2 +- 12 files changed, 22 insertions(+), 21 deletions(-) diff --git a/charts/self-host/templates/admin.yaml b/charts/self-host/templates/admin.yaml index 1e4ed87a..7876138f 100644 --- a/charts/self-host/templates/admin.yaml +++ b/charts/self-host/templates/admin.yaml @@ -13,7 +13,6 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: -{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.admin.deploymentStrategy }}" @@ -27,6 +26,7 @@ spec: app: {{ template "bitwarden.admin" . }} {{ include "bitwarden.labels" . | indent 8 }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 6 }} {{- if .Values.component.admin.podServiceAccount }} serviceAccount: "{{ .Values.component.admin.podServiceAccount }}" serviceAccountName: "{{ .Values.component.admin.podServiceAccount }}" diff --git a/charts/self-host/templates/api.yaml b/charts/self-host/templates/api.yaml index 3aedd755..d01e1ab9 100644 --- a/charts/self-host/templates/api.yaml +++ b/charts/self-host/templates/api.yaml @@ -12,7 +12,6 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: -{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.api.deploymentStrategy }}" diff --git a/charts/self-host/templates/attachments.yaml b/charts/self-host/templates/attachments.yaml index 7aa6a82c..f51089f3 100644 --- a/charts/self-host/templates/attachments.yaml +++ b/charts/self-host/templates/attachments.yaml @@ -12,7 +12,7 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: -{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} + replicas: 1 strategy: type: "{{ .Values.component.attachments.deploymentStrategy }}" @@ -26,6 +26,7 @@ spec: app.kubernetes.io/component: attachments {{ include "bitwarden.labels" . | indent 8 }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 6 }} {{- if .Values.component.attachments.podServiceAccount }} serviceAccount: "{{ .Values.component.attachments.podServiceAccount }}" serviceAccountName: "{{ .Values.component.attachments.podServiceAccount }}" diff --git a/charts/self-host/templates/events.yaml b/charts/self-host/templates/events.yaml index ce2a8990..619f53dd 100644 --- a/charts/self-host/templates/events.yaml +++ b/charts/self-host/templates/events.yaml @@ -12,7 +12,7 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: -{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} + replicas: 1 strategy: type: "{{ .Values.component.events.deploymentStrategy }}" @@ -26,6 +26,7 @@ spec: app.kubernetes.io/component: events {{ include "bitwarden.labels" . | indent 8 }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 6 }} {{- if .Values.component.events.podServiceAccount }} serviceAccount: "{{ .Values.component.events.podServiceAccount }}" serviceAccountName: "{{ .Values.component.events.podServiceAccount }}" diff --git a/charts/self-host/templates/helpers.tpl b/charts/self-host/templates/helpers.tpl index da8674e9..4d220881 100644 --- a/charts/self-host/templates/helpers.tpl +++ b/charts/self-host/templates/helpers.tpl @@ -65,7 +65,7 @@ app.kubernetes.io/name: {{ template "bitwarden.name" . }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} helm.sh/chart: {{ template "bitwarden.chart" . }} -{{- if eq (.Values.general.volumeAccessMode "ReadWriteOnce") }} +{{- if eq .Values.general.volumeAccessMode "ReadWriteOnce" }} app.kubernetes.io/storage: "ReadWriteOnce" {{- end -}} {{- if .Values.general.labels }} @@ -244,16 +244,16 @@ Name of SCIM components {{- define "bitwarden.podCoLocation.affinity" -}} -{{- if eq (.Values.general.volumeAccessMode "ReadWriteOnce") }} +{{- if eq .Values.general.volumeAccessMode "ReadWriteOnce" }} affinity: -podAffinity: + podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app.kubernetes.io/storage - operator: In - values: - - ReadWriteOnce - topologyKey: "kubernetes.io/hostname" + - labelSelector: + matchExpressions: + - key: app.kubernetes.io/storage + operator: In + values: + - ReadWriteOnce + topologyKey: "kubernetes.io/hostname" {{- end -}} {{- end -}} diff --git a/charts/self-host/templates/icons.yaml b/charts/self-host/templates/icons.yaml index 7e433561..b69a810e 100644 --- a/charts/self-host/templates/icons.yaml +++ b/charts/self-host/templates/icons.yaml @@ -12,7 +12,6 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: -{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.icons.deploymentStrategy }}" @@ -26,6 +25,7 @@ spec: app.kubernetes.io/component: icons {{ include "bitwarden.labels" . | indent 8 }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 6 }} {{- if .Values.component.icons.podServiceAccount }} serviceAccount: "{{ .Values.component.icons.podServiceAccount }}" serviceAccountName: "{{ .Values.component.icons.podServiceAccount }}" diff --git a/charts/self-host/templates/identity.yaml b/charts/self-host/templates/identity.yaml index 5687d667..6a0fa933 100644 --- a/charts/self-host/templates/identity.yaml +++ b/charts/self-host/templates/identity.yaml @@ -12,7 +12,6 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: -{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.identity.deploymentStrategy }}" @@ -26,6 +25,7 @@ spec: app.kubernetes.io/component: identity {{ include "bitwarden.labels" . | indent 8 }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 6 }} {{- if .Values.component.identity.podServiceAccount }} serviceAccount: "{{ .Values.component.identity.podServiceAccount }}" serviceAccountName: "{{ .Values.component.identity.podServiceAccount }}" diff --git a/charts/self-host/templates/notifications.yaml b/charts/self-host/templates/notifications.yaml index d9f643e9..c9f07cb0 100644 --- a/charts/self-host/templates/notifications.yaml +++ b/charts/self-host/templates/notifications.yaml @@ -12,7 +12,6 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: -{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.notifications.deploymentStrategy }}" @@ -26,6 +25,7 @@ spec: app.kubernetes.io/component: notifications {{ include "bitwarden.labels" . | indent 8 }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 6 }} {{- if .Values.component.notifications.podServiceAccount }} serviceAccount: "{{ .Values.component.notifications.podServiceAccount }}" serviceAccountName: "{{ .Values.component.notifications.podServiceAccount }}" diff --git a/charts/self-host/templates/post-install-db-migrator-job.yaml b/charts/self-host/templates/post-install-db-migrator-job.yaml index 2608fabf..b611b084 100644 --- a/charts/self-host/templates/post-install-db-migrator-job.yaml +++ b/charts/self-host/templates/post-install-db-migrator-job.yaml @@ -16,7 +16,7 @@ spec: labels: app.kubernetes.io/component: post-install-db-migrator-job spec: - {{- if and (.Values.database.enabled) ( eq (.Values.general.volumeAccessMode "ReadWriteOnce") }} + {{- if and (.Values.database.enabled) ( eq .Values.general.volumeAccessMode "ReadWriteOnce") }} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: diff --git a/charts/self-host/templates/pre-install-db-migrator-job.yaml b/charts/self-host/templates/pre-install-db-migrator-job.yaml index 39b41186..7e5f9c8a 100644 --- a/charts/self-host/templates/pre-install-db-migrator-job.yaml +++ b/charts/self-host/templates/pre-install-db-migrator-job.yaml @@ -20,7 +20,7 @@ spec: labels: app.kubernetes.io/component: pre-install-db-migrator-job spec: - {{- if and (.Values.database.enabled) ( eq (.Values.general.volumeAccessMode "ReadWriteOnce") }} + {{- if and (.Values.database.enabled) (eq .Values.general.volumeAccessMode "ReadWriteOnce") }} affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: diff --git a/charts/self-host/templates/scim.yaml b/charts/self-host/templates/scim.yaml index e6614896..93981c2e 100644 --- a/charts/self-host/templates/scim.yaml +++ b/charts/self-host/templates/scim.yaml @@ -12,7 +12,6 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: -{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.scim.deploymentStrategy }}" @@ -26,6 +25,7 @@ spec: app.kubernetes.io/component: scim {{ include "bitwarden.labels" . | indent 8 }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 6 }} {{- if .Values.component.scim.podServiceAccount }} serviceAccount: "{{ .Values.component.scim.podServiceAccount }}" serviceAccountName: "{{ .Values.component.scim.podServiceAccount }}" diff --git a/charts/self-host/templates/sso.yaml b/charts/self-host/templates/sso.yaml index 51c4fcdf..58f6a9ab 100644 --- a/charts/self-host/templates/sso.yaml +++ b/charts/self-host/templates/sso.yaml @@ -12,7 +12,6 @@ metadata: {{ toYaml . | indent 4 }} {{- end }} spec: -{{ include "bitwarden.podCoLocation.affinity" . | indent 2 }} replicas: 1 strategy: type: "{{ .Values.component.sso.deploymentStrategy }}" @@ -26,6 +25,7 @@ spec: app.kubernetes.io/component: sso {{ include "bitwarden.labels" . | indent 8 }} spec: +{{ include "bitwarden.podCoLocation.affinity" . | indent 6 }} {{- if .Values.component.sso.podServiceAccount }} serviceAccount: "{{ .Values.component.sso.podServiceAccount }}" serviceAccountName: "{{ .Values.component.sso.podServiceAccount }}"