From 611d22e4b0f325c138919ca5921f535d4b441fe0 Mon Sep 17 00:00:00 2001 From: Pascal Iske Date: Thu, 1 Aug 2024 23:17:52 +0200 Subject: [PATCH] feat(vaultwarden): added support for changing the controller update strategy --- charts/vaultwarden/Chart.yaml | 6 +++--- charts/vaultwarden/README.md | 3 ++- charts/vaultwarden/templates/controller.yaml | 6 ++++++ charts/vaultwarden/values.yaml | 2 ++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/charts/vaultwarden/Chart.yaml b/charts/vaultwarden/Chart.yaml index 2e2402b7..72c9bd1b 100644 --- a/charts/vaultwarden/Chart.yaml +++ b/charts/vaultwarden/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 type: application name: vaultwarden description: A Helm chart for Vaultwarden -version: 1.0.1 +version: 1.1.0 # renovate: image=ghcr.io/dani-garcia/vaultwarden appVersion: "1.31.0" @@ -26,5 +26,5 @@ dependencies: annotations: # possible kinds: added, changed, deprecated, removed, fixed, security artifacthub.io/changes: | - - kind: changed - description: 'Ensure the mount path is propagated to the app if persistence is used.' + - kind: added + description: 'Added support for changing the controller update strategy.' diff --git a/charts/vaultwarden/README.md b/charts/vaultwarden/README.md index b183e9ff..0ae3890a 100644 --- a/charts/vaultwarden/README.md +++ b/charts/vaultwarden/README.md @@ -2,7 +2,7 @@ > A Helm chart for Vaultwarden -[![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/vaultwarden/)[![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/vaultwarden/)[![AppVersion: 1.31.0](https://img.shields.io/badge/AppVersion-1.31.0-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/vaultwarden/) +[![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/vaultwarden/)[![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/vaultwarden/)[![AppVersion: 1.31.0](https://img.shields.io/badge/AppVersion-1.31.0-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/vaultwarden/) * * @@ -53,6 +53,7 @@ The following values can be used to adjust the helm chart. | controller.kind | string | `"Deployment"` | Type of the workload object. | | controller.labels | object | `{}` | Additional labels for the controller object. | | controller.replicas | int | `1` | The number of replicas. | +| controller.updateStrategy | object | `{}` | The controller update strategy. Currently only applies to controllers of kind `Deployment`. | | env[0] | object | `{"name":"TZ","value":"UTC"}` | Timezone for the container. | | fullnameOverride | string | `""` | | | image.pullPolicy | string | `"IfNotPresent"` | The pull policy for the controller. | diff --git a/charts/vaultwarden/templates/controller.yaml b/charts/vaultwarden/templates/controller.yaml index 97d624c6..85cf02a8 100644 --- a/charts/vaultwarden/templates/controller.yaml +++ b/charts/vaultwarden/templates/controller.yaml @@ -22,6 +22,12 @@ spec: selector: matchLabels: {{- include "vaultwarden.selectorLabels" . | nindent 6 }} + {{- if eq (include "base.controller.kind" . ) "Deployment" }} + {{- with .Values.controller.updateStrategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- end }} template: metadata: {{- with .Values.controller.annotations }} diff --git a/charts/vaultwarden/values.yaml b/charts/vaultwarden/values.yaml index 7ae6c74e..89ade1e6 100644 --- a/charts/vaultwarden/values.yaml +++ b/charts/vaultwarden/values.yaml @@ -19,6 +19,8 @@ controller: kind: Deployment # -- The number of replicas. replicas: 1 + # -- The controller update strategy. Currently only applies to controllers of kind `Deployment`. + updateStrategy: {} # -- Additional annotations for the controller object. annotations: {} # -- Additional labels for the controller object.