diff --git a/charts/vaultwarden/Chart.yaml b/charts/vaultwarden/Chart.yaml index 01f232a..4a5a3f6 100644 --- a/charts/vaultwarden/Chart.yaml +++ b/charts/vaultwarden/Chart.yaml @@ -9,7 +9,7 @@ sources: - https://github.com/guerzon/vaultwarden - https://github.com/dani-garcia/vaultwarden appVersion: "1.30.5" -version: 0.22.19 +version: 0.22.20 kubeVersion: ">=1.12.0-0" dependencies: diff --git a/charts/vaultwarden/templates/_helpers.tpl b/charts/vaultwarden/templates/_helpers.tpl index 7f0e6cf..d174526 100644 --- a/charts/vaultwarden/templates/_helpers.tpl +++ b/charts/vaultwarden/templates/_helpers.tpl @@ -76,19 +76,4 @@ Return the appropriate apiVersion for podDisruptionBudget. {{- else -}} {{- print "policy/v1beta1" -}} {{- end -}} -{{- end -}} - -{{/* -Determine whether to use deployment or statefulset -*/}} -{{- define "vaultwarden.resourceType" -}} -{{- if .Values.resourceType }} -{{- .Values.resourceType }} -{{- else }} -{{- if (and .Values.data (ne .Values.database.type "default")) }} -{{- "Deployment" }} -{{- else }} -{{- "StatefulSet" }} -{{- end }} -{{- end }} -{{- end }} \ No newline at end of file +{{- end -}} \ No newline at end of file diff --git a/charts/vaultwarden/templates/deployment.yaml b/charts/vaultwarden/templates/deployment.yaml index 201be73..70fb274 100644 --- a/charts/vaultwarden/templates/deployment.yaml +++ b/charts/vaultwarden/templates/deployment.yaml @@ -1,4 +1,3 @@ -{{- if eq (include "vaultwarden.resourceType" .) "Deployment" }} apiVersion: apps/v1 kind: Deployment metadata: @@ -48,5 +47,4 @@ spec: - name: {{ $pvc.metadata.name }} persistentVolumeClaim: claimName: {{ $newName }} - {{- end }} -{{- end }} \ No newline at end of file + {{- end }} \ No newline at end of file diff --git a/charts/vaultwarden/templates/pvc.yaml b/charts/vaultwarden/templates/pvc.yaml index e38380c..fda22db 100644 --- a/charts/vaultwarden/templates/pvc.yaml +++ b/charts/vaultwarden/templates/pvc.yaml @@ -1,4 +1,3 @@ -{{- if eq (include "vaultwarden.resourceType" .) "Deployment" }} {{- range $pvc := (fromYaml (include "vaultwarden.pvcSpec" .)).volumeClaimTemplates }} --- apiVersion: v1 @@ -6,5 +5,4 @@ kind: PersistentVolumeClaim {{- $newName := printf "%s-%s-0" $pvc.metadata.name $.Release.Name }} {{- $newPvc := merge (dict "metadata" (dict "name" $newName)) $pvc }} {{ $newPvc | toYaml }} -{{- end }} {{- end }} \ No newline at end of file diff --git a/charts/vaultwarden/templates/statefulset.yaml b/charts/vaultwarden/templates/statefulset.yaml deleted file mode 100644 index af6651d..0000000 --- a/charts/vaultwarden/templates/statefulset.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{{- if eq (include "vaultwarden.resourceType" .) "StatefulSet" }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "vaultwarden.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app.kubernetes.io/component: vaultwarden - {{- include "vaultwarden.labels" . | nindent 4 }} - {{- range $key, $value := .Values.commonLabels }} - {{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }} - {{- end }} - {{- with .Values.commonAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - serviceName: vaultwarden - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/component: vaultwarden - {{- include "vaultwarden.selectorLabels" . | nindent 6 }} - {{- with .Values.strategy }} - updateStrategy: - {{- . | toYaml | nindent 8 }} - {{- end }} - template: - metadata: - labels: - app.kubernetes.io/component: vaultwarden - {{- include "vaultwarden.selectorLabels" . | nindent 8 }} - {{- with .Values.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - 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 }} - spec: - {{- include "vaultwarden.podSpec" . | nindent 6 }} - persistentVolumeClaimRetentionPolicy: - whenDeleted: Retain - whenScaled: Retain - {{- include "vaultwarden.pvcSpec" . | nindent 2 }} -{{- end }} diff --git a/charts/vaultwarden/values.yaml b/charts/vaultwarden/values.yaml index 770a1f1..834de80 100644 --- a/charts/vaultwarden/values.yaml +++ b/charts/vaultwarden/values.yaml @@ -30,11 +30,6 @@ image: ## fullnameOverride: "" -## @param resourceType Can be either Deployment or StatefulSet -## Overwrite automatic resource type detection by specifying the resource type -## -resourceType: "" - ## @param commonAnnotations Annotations for the deployment or statefulset ## commonAnnotations: {} @@ -238,9 +233,9 @@ webVaultEnabled: "true" database: ## @param database.type Database type, either mysql or postgresql - ## Default is a sqlite database. + ## Default is a postgresql database. ## - type: "default" + type: "postgresql" ## @param database.host Database hostname or IP address ## host: ""