Bump vaultwarden
This commit is contained in:
@@ -4,10 +4,6 @@
|
||||
{{- else if .Values.ingressRoute.enabled }}
|
||||
http{{ if $.Values.ingressRoute.tls }}s{{ end }}://{{ .Values.ingressRoute.host }}/
|
||||
{{- else }}
|
||||
{{- if eq .Values.vaultwarden.enableWebsockets true }}
|
||||
NOTE: the websocket listens on a different port and might not work unless /notifications/hub is redirected externally.
|
||||
|
||||
{{- end }}
|
||||
{{- if contains "NodePort" .Values.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "vaultwarden.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
|
||||
@@ -36,6 +36,10 @@ spec:
|
||||
serviceAccountName: {{ include "vaultwarden.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- if .Values.initContainers }}
|
||||
initContainers:
|
||||
{{- toYaml .Values.initContainers | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
@@ -81,8 +85,6 @@ spec:
|
||||
{{- end }}
|
||||
- name: SHOW_PASSWORD_HINT
|
||||
value: {{ .Values.vaultwarden.showPasswordHint | quote }}
|
||||
- name: WEBSOCKET_ENABLED
|
||||
value: {{ .Values.vaultwarden.enableWebsockets | quote }}
|
||||
- name: WEB_VAULT_ENABLED
|
||||
value: {{ .Values.vaultwarden.enableWebVault | quote }}
|
||||
- name: SENDS_ALLOWED
|
||||
@@ -97,6 +99,10 @@ spec:
|
||||
- name: USER_ATTACHMENT_LIMIT
|
||||
value: {{ .Values.vaultwarden.attachmentLimitUser | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.vaultwarden.sendLimitUser }}
|
||||
- name: USER_SEND_LIMIT
|
||||
value: {{ .Values.vaultwarden.sendLimitUser | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.vaultwarden.hibpApiKey }}
|
||||
- name: HIBP_API_KEY
|
||||
value: {{ .Values.vaultwarden.hibpApiKey | quote }}
|
||||
@@ -113,10 +119,22 @@ spec:
|
||||
- name: EVENTS_DAYS_RETAIN
|
||||
value: {{ .Values.vaultwarden.orgEventsRetention | quote }}
|
||||
{{- end }}
|
||||
{{- if hasKey .Values.vaultwarden "emailChangeAllowed" }}
|
||||
- name: EMAIL_CHANGE_ALLOWED
|
||||
value: {{ .Values.vaultwarden.emailChangeAllowed | quote }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.vaultwarden.extraEnv }}
|
||||
{{- range $key, $val := .Values.vaultwarden.extraEnv }}
|
||||
- name: {{ $key }}
|
||||
{{- if kindIs "string" $val }}
|
||||
value: {{ $val | quote }}
|
||||
{{- else if or (hasKey $val "secretKeyRef") (hasKey $val "configMapKeyRef") }}
|
||||
valueFrom:
|
||||
{{- $val | toYaml | nindent 16 }}
|
||||
{{- else }}
|
||||
{{- fail "Items in extraEnv must be either text or contain a valueFrom key (configMapKeyRef or secretKeyRef)" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- include "vaultwarden.dbTypeValid" . }}
|
||||
@@ -138,7 +156,7 @@ spec:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ if .Values.database.existingSecret }}{{ .Values.database.existingSecret }}{{else}}{{ include "vaultwarden.fullname" . }}{{end}}
|
||||
key: database-url
|
||||
key: {{ if and .Values.database.existingSecret .Values.database.existingSecretKey }}{{ .Values.database.existingSecretKey }}{{else}}database-url{{end}}
|
||||
{{- end }}
|
||||
{{- if .Values.vaultwarden.domain }}
|
||||
- name: DOMAIN
|
||||
@@ -273,9 +291,9 @@ spec:
|
||||
{{- if .Values.vaultwarden.icons.disableDownload }}
|
||||
- name: DISABLE_ICON_DOWNLOAD
|
||||
value: {{ .Values.vaultwarden.icons.disableDownload | quote }}
|
||||
{{- if and (not .Values.vaultwarden.icons.cache) (eq .Values.vaultwarden.icons.disableDownload "true") }}
|
||||
{{- if and (not .Values.vaultwarden.icons.cache) (.Values.vaultwarden.icons.disableDownload) }}
|
||||
- name: ICON_CACHE_TTL
|
||||
value: 0
|
||||
value: "0"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.vaultwarden.icons.cache }}
|
||||
@@ -289,24 +307,45 @@ spec:
|
||||
{{- if hasKey .Values.vaultwarden.icons "redirectCode" }}
|
||||
- name: ICON_REDIRECT_CODE
|
||||
value: {{ .Values.vaultwarden.icons.redirectCode | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.vaultwarden.push.enabled true }}
|
||||
- name: PUSH_INSTALLATION_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.vaultwarden.push.existingSecret | default (include "vaultwarden.fullname" .) }}
|
||||
key: push-id
|
||||
- name: PUSH_INSTALLATION_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.vaultwarden.push.existingSecret | default (include "vaultwarden.fullname" .) }}
|
||||
key: push-key
|
||||
{{- if hasKey .Values.vaultwarden.push "relayUri" }}
|
||||
- name: PUSH_RELAY_URI
|
||||
value: {{ .Values.vaultwarden.push.relayUri | quote }}
|
||||
{{- end }}
|
||||
{{- if hasKey .Values.vaultwarden.push "identityUri" }}
|
||||
- name: PUSH_IDENTITY_URI
|
||||
value: {{ .Values.vaultwarden.push.identityUri | quote }}
|
||||
{{- end }}
|
||||
{{- end }}{{/* Push */}}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
{{- if .Values.vaultwarden.enableWebsockets }}
|
||||
- name: websocket
|
||||
containerPort: 3012
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: {{ include "vaultwarden.domainSubPath" . }}
|
||||
port: http
|
||||
{{- if .Values.probes.liveness }}
|
||||
{{- toYaml .Values.probes.liveness | nindent 12 }}
|
||||
{{- end }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: {{ include "vaultwarden.domainSubPath" . }}
|
||||
port: http
|
||||
{{- if .Values.probes.readiness }}
|
||||
{{- toYaml .Values.probes.readiness | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: {{ include "vaultwarden.fullname" . }}
|
||||
mountPath: /data
|
||||
@@ -328,6 +367,9 @@ spec:
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.additionalVolumes }}
|
||||
{{- toYaml .Values.additionalVolumes | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "vaultwarden.fullname" . -}}
|
||||
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
@@ -34,34 +28,11 @@ spec:
|
||||
- host: {{ required "Host required for ingress" .Values.ingress.host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- if .Values.vaultwarden.enableWebsockets }}
|
||||
- path: "/notifications/hub"
|
||||
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
|
||||
pathType: Prefix
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ .Values.service.websocketPort }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ .Values.service.websocketPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- path: "/"
|
||||
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
|
||||
pathType: Prefix
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ .Values.service.httpPort }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ .Values.service.httpPort }}
|
||||
{{- end }}
|
||||
name: http
|
||||
{{- end }}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
{{- if .Values.ingressRoute.enabled -}}
|
||||
{{- $fullName := include "vaultwarden.fullname" . -}}
|
||||
{{- $host := (required "Host required for IngressRoute" .Values.ingressRoute.host ) -}}
|
||||
{{- if .Values.ingressRoute.newCRD }}
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
{{- else }}
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
{{- end }}
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
@@ -13,17 +17,6 @@ spec:
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
routes:
|
||||
{{- if .Values.vaultwarden.enableWebsockets }}
|
||||
- match: Host(`{{ $host }}`) && PathPrefix(`/notifications/hub`)
|
||||
kind: Rule
|
||||
{{- if .Values.ingressRoute.middlewares }}
|
||||
middlewares:
|
||||
{{- toYaml .Values.ingressRoute.middlewares | nindent 6 }}
|
||||
{{- end }}
|
||||
services:
|
||||
- name: {{ $fullName }}
|
||||
port: {{ .Values.service.websocketPort }}
|
||||
{{- end }}
|
||||
- match: Host(`{{ $host }}`)
|
||||
kind: Rule
|
||||
{{- if .Values.ingressRoute.middlewares }}
|
||||
|
||||
@@ -3,6 +3,10 @@ kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ include "vaultwarden.fullname" . }}
|
||||
{{- with .Values.persistence.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.accessMode | quote }}
|
||||
|
||||
@@ -18,7 +18,12 @@
|
||||
{{- $yubicoClientId = required "Yubico Client ID required" .Values.vaultwarden.yubico.clientId | toString | b64enc | quote }}
|
||||
{{- end -}}
|
||||
|
||||
{{- if or (ne $adminToken "") (ne $databaseUrl "") (ne $smtpUser "" ) (ne $yubicoClientId "") }}
|
||||
{{- $pushId := "" }}
|
||||
{{- if and (eq .Values.vaultwarden.push.enabled true ) (not .Values.vaultwarden.push.existingSecret) }}
|
||||
{{- $pushId = required "Push Installation ID required" .Values.vaultwarden.push.installationId | toString | b64enc | quote }}
|
||||
{{- end -}}
|
||||
|
||||
{{- if or (ne $adminToken "") (ne $databaseUrl "") (ne $smtpUser "" ) (ne $yubicoClientId "") (ne $pushId "") }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
@@ -40,4 +45,8 @@ data:
|
||||
yubico-client-id: {{ $yubicoClientId }}
|
||||
yubico-secret-key: {{ required "Yubico Secret Key required" .Values.vaultwarden.yubico.secretKey | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- if ne $pushId "" }}
|
||||
push-id: {{ $pushId }}
|
||||
push-key: {{ required "Push Installation Key required" .Values.vaultwarden.push.installationKey | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -20,14 +20,5 @@ spec:
|
||||
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.http)))}}
|
||||
nodePort: {{ .Values.service.nodePorts.http }}
|
||||
{{- end }}
|
||||
{{- if .Values.vaultwarden.enableWebsockets }}
|
||||
- name: websocket
|
||||
port: {{ .Values.service.websocketPort }}
|
||||
targetPort: websocket
|
||||
protocol: TCP
|
||||
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.websocket)))}}
|
||||
nodePort: {{ .Values.service.nodePorts.websocket }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "vaultwarden.selectorLabels" . | nindent 4 }}
|
||||
|
||||
Reference in New Issue
Block a user