From dd0520f87b2a80c3797208dbe9aca965a6a2987d Mon Sep 17 00:00:00 2001 From: Thomas Lochet Date: Mon, 22 Sep 2025 21:16:26 +0200 Subject: [PATCH] feat: allow configuring pod priority class --- charts/vaultwarden/Chart.yaml | 2 +- charts/vaultwarden/README.md | 1 + charts/vaultwarden/templates/_podSpec.tpl | 5 ++++- charts/vaultwarden/values.yaml | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/vaultwarden/Chart.yaml b/charts/vaultwarden/Chart.yaml index 5be152a..cefd61f 100644 --- a/charts/vaultwarden/Chart.yaml +++ b/charts/vaultwarden/Chart.yaml @@ -13,5 +13,5 @@ maintainers: - name: guerzon email: guerzon@proton.me url: https://github.com/guerzon -version: 0.34.3 +version: 0.34.4 kubeVersion: ">=1.12.0-0" diff --git a/charts/vaultwarden/README.md b/charts/vaultwarden/README.md index 837b2b3..c4f280d 100644 --- a/charts/vaultwarden/README.md +++ b/charts/vaultwarden/README.md @@ -390,6 +390,7 @@ helm -n $NAMESPACE uninstall $RELEASE_NAME | `nodeSelector` | Node labels for pod assignment | `{}` | | `affinity` | Affinity for pod assignment | `{}` | | `tolerations` | Tolerations for pod assignment | `[]` | +| `priorityClassName` | Assign a priority class to pods | `""` | | `serviceAccount.create` | Create a service account | `true` | | `serviceAccount.name` | Name of the service account to create | `vaultwarden-svc` | | `podSecurityContext` | Pod security options | `{}` | diff --git a/charts/vaultwarden/templates/_podSpec.tpl b/charts/vaultwarden/templates/_podSpec.tpl index 3e58150..ee91270 100644 --- a/charts/vaultwarden/templates/_podSpec.tpl +++ b/charts/vaultwarden/templates/_podSpec.tpl @@ -15,6 +15,9 @@ affinity: tolerations: {{- toYaml . | nindent 2 }} {{- end }} +{{- with .Values.priorityClassName }} +priorityClassName: {{ . | quote }} +{{- end }} {{- with .Values.podSecurityContext }} securityContext: {{- toYaml . | nindent 2 }} @@ -235,4 +238,4 @@ serviceAccountName: {{ .Values.serviceAccount.name }} imagePullSecrets: {{- toYaml . | nindent 2 }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/vaultwarden/values.yaml b/charts/vaultwarden/values.yaml index 6bfa05a..a07046e 100644 --- a/charts/vaultwarden/values.yaml +++ b/charts/vaultwarden/values.yaml @@ -112,6 +112,11 @@ affinity: {} ## tolerations: [] +## @param priorityClassName Assign a priority class to pods +## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ +## +priorityClassName: "" + ## @param serviceAccount.create Create a service account ## @param serviceAccount.name Name of the service account to create ##