From f1e281c49c1650b8f4eae6953826f512a44709cd Mon Sep 17 00:00:00 2001 From: Lester Guerzon Date: Sun, 5 Nov 2023 18:23:39 +0800 Subject: [PATCH] fix: sts annotations Signed-off-by: Lester Guerzon --- charts/vaultwarden/Chart.yaml | 2 +- charts/vaultwarden/README.md | 17 +++++++++-------- charts/vaultwarden/templates/statefulset.yaml | 14 +++++++------- charts/vaultwarden/values.yaml | 4 ++++ 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/charts/vaultwarden/Chart.yaml b/charts/vaultwarden/Chart.yaml index 70c0b30..4aae120 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.16.0 +version: 0.16.1 kubeVersion: ">=1.12.0-0" diff --git a/charts/vaultwarden/README.md b/charts/vaultwarden/README.md index 7651359..c986a56 100644 --- a/charts/vaultwarden/README.md +++ b/charts/vaultwarden/README.md @@ -352,11 +352,12 @@ helm -n $NAMESPACE uninstall $RELEASE_NAME ### Extra Configuration -| Name | Description | Value | -| ------------------- | ------------------------------------- | ----- | -| `nodeSelector` | Node labels for pod assignment | `{}` | -| `affinity` | Affinity for pod assignment | `{}` | -| `tolerations` | Tolerations for pod assignment | `[]` | -| `statefulsetlabels` | Additional labels for the statefulset | `{}` | -| `pushNotifications` | Enable mobile push notifications | `{}` | -| `resources` | Resource configurations | `{}` | +| Name | Description | Value | +| ------------------------ | ------------------------------------- | ----- | +| `nodeSelector` | Node labels for pod assignment | `{}` | +| `affinity` | Affinity for pod assignment | `{}` | +| `tolerations` | Tolerations for pod assignment | `[]` | +| `statefulsetlabels` | Additional labels for the statefulset | `{}` | +| `statefulsetAnnotations` | Annotations for the statefulset | `{}` | +| `pushNotifications` | Enable mobile push notifications | `{}` | +| `resources` | Resource configurations | `{}` | diff --git a/charts/vaultwarden/templates/statefulset.yaml b/charts/vaultwarden/templates/statefulset.yaml index 9f6906e..22d15a4 100644 --- a/charts/vaultwarden/templates/statefulset.yaml +++ b/charts/vaultwarden/templates/statefulset.yaml @@ -9,6 +9,10 @@ metadata: {{- range $key, $value := .Values.statefulsetlabels }} {{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }} {{- end }} + {{- with .Values.statefulsetAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: serviceName: vaultwarden replicas: 1 @@ -18,10 +22,6 @@ spec: {{- include "vaultwarden.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} labels: app.kubernetes.io/component: vaultwarden {{- include "vaultwarden.selectorLabels" . | nindent 8 }} @@ -31,9 +31,9 @@ spec: annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha1sum }} checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha1sum }} - {{- with .Values.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- if .Values.nodeSelector }} nodeSelector: diff --git a/charts/vaultwarden/values.yaml b/charts/vaultwarden/values.yaml index 36aa053..da8ad84 100644 --- a/charts/vaultwarden/values.yaml +++ b/charts/vaultwarden/values.yaml @@ -349,6 +349,10 @@ tolerations: [] ## statefulsetlabels: {} +## @param statefulsetAnnotations Annotations for the statefulset +## +statefulsetAnnotations: {} + ## @param pushNotifications Enable mobile push notifications ## Supported since 1.29.0. ## Refer to https://github.com/dani-garcia/vaultwarden/wiki/Enabling-Mobile-Client-push-notification for details