Skip to content

[PM-19673] Add nodeSelector and tolerations #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a02d781
add default nodeSelect & tolerations values
Invincibear Mar 29, 2025
52c70ff
add nodeSelector & tolerations to admin template
Invincibear Mar 29, 2025
a4978a1
add nodeSelector & tolerations to api template
Invincibear Mar 29, 2025
15fe795
add nodeSelector & tolerations to attachments template
Invincibear Mar 29, 2025
ff6c5b2
add nodeSelector & tolerations to events template
Invincibear Mar 29, 2025
971607f
add nodeSelector & tolerations to icons template
Invincibear Mar 29, 2025
bd489f7
add nodeSelector & tolerations to notifications template
Invincibear Mar 29, 2025
3d521c9
add nodeSelector & tolerations to scim template
Invincibear Mar 29, 2025
dab4e76
add nodeSelector & tolerations to sso template
Invincibear Mar 29, 2025
52d1305
add nodeSelector & tolerations to web template
Invincibear Mar 29, 2025
1bfed62
add nodeSelector & tolerations to mssql template
Invincibear Mar 29, 2025
fc8e190
add nodeSelector & tolerations to pre & post templates
Invincibear Mar 29, 2025
0169210
add nodeSelector & tolerations to sm-operator deployment
Invincibear Mar 29, 2025
c4845f7
add nodeSelector & tolerations to values.schema.json
Invincibear Mar 29, 2025
9e3c85c
tolerations should be an array of objects
Invincibear Mar 29, 2025
8ccf8ac
Update charts/sm-operator/values.yaml
Invincibear Mar 29, 2025
3e181cd
remove test data from charts/self-host/values.yaml
Invincibear Mar 29, 2025
36b679d
Merge branch 'main' into add_nodeselector_and_tolerations
Invincibear May 2, 2025
2c45e78
Merge branch 'main' into add_nodeselector_and_tolerations
Invincibear May 22, 2025
08d1479
Merge branch 'main' into add_nodeselector_and_tolerations
mimartin12 Jun 9, 2025
4efece1
Merge branch 'main' into add_nodeselector_and_tolerations
mimartin12 Jun 10, 2025
f79917b
Merge branch 'main' into add_nodeselector_and_tolerations
Invincibear Jun 10, 2025
62a3ea4
move nodeSelector & tolerations next to labels
Invincibear Jun 10, 2025
9c75922
move all nodeSelect & tolerations next to labels, add comments
Invincibear Jun 10, 2025
4e4a8b4
move all nodeSelect & tolerations next to labels in values.schema.json
Invincibear Jun 10, 2025
9d87ae1
harmonize nodeSelector & toleration comments in sm-operator Helm chart
Invincibear Jun 10, 2025
6dda882
Merge branch 'main' into add_nodeselector_and_tolerations
mimartin12 Jun 10, 2025
a025dea
Merge branch 'main' into add_nodeselector_and_tolerations
mimartin12 Jun 10, 2025
121476c
Merge branch 'main' into add_nodeselector_and_tolerations
mimartin12 Jun 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions charts/self-host/templates/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ spec:
app: {{ template "bitwarden.admin" . }}
{{ include "bitwarden.labels" . | indent 8 }}
spec:
{{- if or .Values.component.admin.nodeSelector .Values.general.nodeSelector }}
nodeSelector:
{{- if .Values.component.admin.nodeSelector }}
{{ toYaml .Values.component.admin.nodeSelector | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.nodeSelector | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .Values.component.admin.tolerations .Values.general.tolerations }}
tolerations:
{{- if .Values.component.admin.tolerations }}
{{ toYaml .Values.component.admin.tolerations | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.tolerations | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.component.admin.podServiceAccount }}
serviceAccount: {{ .Values.component.admin.podServiceAccount | quote }}
serviceAccountName: {{ .Values.component.admin.podServiceAccount | quote }}
Expand Down
16 changes: 16 additions & 0 deletions charts/self-host/templates/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ spec:
app.kubernetes.io/component: api
{{ include "bitwarden.labels" . | indent 8 }}
spec:
{{- if or .Values.component.api.nodeSelector .Values.general.nodeSelector }}
nodeSelector:
{{- if .Values.component.api.nodeSelector }}
{{ toYaml .Values.component.api.nodeSelector | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.nodeSelector | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .Values.component.api.tolerations .Values.general.tolerations }}
tolerations:
{{- if .Values.component.api.tolerations }}
{{ toYaml .Values.component.api.tolerations | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.tolerations | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.component.api.podServiceAccount }}
serviceAccount: {{ .Values.component.api.podServiceAccount | quote }}
serviceAccountName: {{ .Values.component.api.podServiceAccount | quote }}
Expand Down
16 changes: 16 additions & 0 deletions charts/self-host/templates/attachments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ spec:
app.kubernetes.io/component: attachments
{{ include "bitwarden.labels" . | indent 8 }}
spec:
{{- if or .Values.component.attachments.nodeSelector .Values.general.nodeSelector }}
nodeSelector:
{{- if .Values.component.attachments.nodeSelector }}
{{ toYaml .Values.component.attachments.nodeSelector | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.nodeSelector | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .Values.component.attachments.tolerations .Values.general.tolerations }}
tolerations:
{{- if .Values.component.attachments.tolerations }}
{{ toYaml .Values.component.attachments.tolerations | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.tolerations | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.component.attachments.podServiceAccount }}
serviceAccount: {{ .Values.component.attachments.podServiceAccount | quote }}
serviceAccountName: {{ .Values.component.attachments.podServiceAccount | quote }}
Expand Down
16 changes: 16 additions & 0 deletions charts/self-host/templates/events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ spec:
app.kubernetes.io/component: events
{{ include "bitwarden.labels" . | indent 8 }}
spec:
{{- if or .Values.component.events.nodeSelector .Values.general.nodeSelector }}
nodeSelector:
{{- if .Values.component.events.nodeSelector }}
{{ toYaml .Values.component.events.nodeSelector | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.nodeSelector | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .Values.component.events.tolerations .Values.general.tolerations }}
tolerations:
{{- if .Values.component.events.tolerations }}
{{ toYaml .Values.component.events.tolerations | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.tolerations | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.component.events.podServiceAccount }}
serviceAccount: {{ .Values.component.events.podServiceAccount | quote }}
serviceAccountName: {{ .Values.component.events.podServiceAccount | quote }}
Expand Down
16 changes: 16 additions & 0 deletions charts/self-host/templates/icons.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ spec:
app.kubernetes.io/component: icons
{{ include "bitwarden.labels" . | indent 8 }}
spec:
{{- if or .Values.component.icons.nodeSelector .Values.general.nodeSelector }}
nodeSelector:
{{- if .Values.component.icons.nodeSelector }}
{{ toYaml .Values.component.icons.nodeSelector | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.nodeSelector | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .Values.component.icons.tolerations .Values.general.tolerations }}
tolerations:
{{- if .Values.component.icons.tolerations }}
{{ toYaml .Values.component.icons.tolerations | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.tolerations | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.component.icons.podServiceAccount }}
serviceAccount: {{ .Values.component.icons.podServiceAccount | quote }}
serviceAccountName: {{ .Values.component.icons.podServiceAccount | quote }}
Expand Down
16 changes: 16 additions & 0 deletions charts/self-host/templates/identity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ spec:
app.kubernetes.io/component: identity
{{ include "bitwarden.labels" . | indent 8 }}
spec:
{{- if or .Values.component.identity.nodeSelector .Values.general.nodeSelector }}
nodeSelector:
{{- if .Values.component.identity.nodeSelector }}
{{ toYaml .Values.component.identity.nodeSelector | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.nodeSelector | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .Values.component.identity.tolerations .Values.general.tolerations }}
tolerations:
{{- if .Values.component.identity.tolerations }}
{{ toYaml .Values.component.identity.tolerations | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.tolerations | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.component.identity.podServiceAccount }}
serviceAccount: {{ .Values.component.identity.podServiceAccount | quote }}
serviceAccountName: {{ .Values.component.identity.podServiceAccount | quote }}
Expand Down
8 changes: 8 additions & 0 deletions charts/self-host/templates/mssql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ spec:
{{ toYaml . | indent 8 }}
{{- end }}
spec:
{{- with .Values.general.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.general.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.database.podServiceAccount }}
serviceAccount: {{ .Values.database.podServiceAccount | quote }}
serviceAccountName: {{ .Values.database.podServiceAccount | quote }}
Expand Down
16 changes: 16 additions & 0 deletions charts/self-host/templates/notifications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ spec:
app.kubernetes.io/component: notifications
{{ include "bitwarden.labels" . | indent 8 }}
spec:
{{- if or .Values.component.notifications.nodeSelector .Values.general.nodeSelector }}
nodeSelector:
{{- if .Values.component.notifications.nodeSelector }}
{{ toYaml .Values.component.notifications.nodeSelector | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.nodeSelector | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .Values.component.notifications.tolerations .Values.general.tolerations }}
tolerations:
{{- if .Values.component.notifications.tolerations }}
{{ toYaml .Values.component.notifications.tolerations | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.tolerations | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.component.notifications.podServiceAccount }}
serviceAccount: {{ .Values.component.notifications.podServiceAccount | quote }}
serviceAccountName: {{ .Values.component.notifications.podServiceAccount | quote }}
Expand Down
8 changes: 8 additions & 0 deletions charts/self-host/templates/post-delete-hook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ spec:
labels:
app.kubernetes.io/component: post-delete-hook
spec:
{{- with .Values.general.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.general.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.serviceAccount.name }}
serviceAccountName: "{{ .Values.serviceAccount.name }}"
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ spec:
labels:
app.kubernetes.io/component: post-install-db-migrator-job
spec:
{{- with .Values.general.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.general.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.serviceAccount.name }}
serviceAccountName: "{{ .Values.serviceAccount.name }}"
{{- end }}
Expand Down
8 changes: 8 additions & 0 deletions charts/self-host/templates/pre-install-db-migrator-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ spec:
labels:
app.kubernetes.io/component: pre-install-db-migrator-job
spec:
{{- with .Values.general.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.general.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.serviceAccount.name }}
serviceAccountName: {{ .Values.serviceAccount.name | quote }}
{{- end }}
Expand Down
8 changes: 8 additions & 0 deletions charts/self-host/templates/pre-install-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ spec:
labels:
app.kubernetes.io/component: pre-install-hook
spec:
{{- with .Values.general.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.general.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.serviceAccount.name }}
serviceAccountName: {{ .Values.serviceAccount.name | quote }}
{{- end }}
Expand Down
8 changes: 8 additions & 0 deletions charts/self-host/templates/pre-install-secret-sql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ spec:
labels:
app.kubernetes.io/component: pre-install-hook
spec:
{{- with .Values.general.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.general.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.serviceAccount.name }}
serviceAccountName: {{ .Values.serviceAccount.name | quote }}
{{- end }}
Expand Down
16 changes: 16 additions & 0 deletions charts/self-host/templates/scim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@ spec:
app.kubernetes.io/component: scim
{{ include "bitwarden.labels" . | indent 8 }}
spec:
{{- if or .Values.component.scim.nodeSelector .Values.general.nodeSelector }}
nodeSelector:
{{- if .Values.component.scim.nodeSelector }}
{{ toYaml .Values.component.scim.nodeSelector | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.nodeSelector | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .Values.component.scim.tolerations .Values.general.tolerations }}
tolerations:
{{- if .Values.component.scim.tolerations }}
{{ toYaml .Values.component.scim.tolerations | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.tolerations | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.component.scim.podServiceAccount }}
serviceAccount: {{ .Values.component.scim.podServiceAccount | quote }}
serviceAccountName: {{ .Values.component.scim.podServiceAccount | quote }}
Expand Down
16 changes: 16 additions & 0 deletions charts/self-host/templates/sso.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ spec:
app.kubernetes.io/component: sso
{{ include "bitwarden.labels" . | indent 8 }}
spec:
{{- if or .Values.component.sso.nodeSelector .Values.general.nodeSelector }}
nodeSelector:
{{- if .Values.component.sso.nodeSelector }}
{{ toYaml .Values.component.sso.nodeSelector | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.nodeSelector | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .Values.component.sso.tolerations .Values.general.tolerations }}
tolerations:
{{- if .Values.component.sso.tolerations }}
{{ toYaml .Values.component.sso.tolerations | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.tolerations | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.component.sso.podServiceAccount }}
serviceAccount: {{ .Values.component.sso.podServiceAccount | quote }}
serviceAccountName: {{ .Values.component.sso.podServiceAccount | quote }}
Expand Down
16 changes: 16 additions & 0 deletions charts/self-host/templates/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ spec:
app.kubernetes.io/component: web
{{ include "bitwarden.labels" . | indent 8 }}
spec:
{{- if or .Values.component.web.nodeSelector .Values.general.nodeSelector }}
nodeSelector:
{{- if .Values.component.web.nodeSelector }}
{{ toYaml .Values.component.web.nodeSelector | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.nodeSelector | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .Values.component.web.tolerations .Values.general.tolerations }}
tolerations:
{{- if .Values.component.web.tolerations }}
{{ toYaml .Values.component.web.tolerations | nindent 8 }}
{{- else }}
{{ toYaml .Values.general.tolerations | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.component.web.podServiceAccount }}
serviceAccount: {{ .Values.component.web.podServiceAccount | quote }}
serviceAccountName: {{ .Values.component.web.podServiceAccount | quote }}
Expand Down
Loading