2021-05-22 22:18:56 +00:00
|
|
|
{{/* Make sure all variables are set properly */}}
|
|
|
|
{{- include "common.values.setup" . }}
|
|
|
|
|
|
|
|
|
|
|
|
{{/* Render configmap for vaultwarden */}}
|
|
|
|
{{- include "vaultwarden.configmap" . }}
|
|
|
|
|
|
|
|
{{/* Render secrets for vaultwarden */}}
|
|
|
|
{{- include "vaultwarden.secrets" . }}
|
2021-09-09 15:15:46 +00:00
|
|
|
|
|
|
|
{{/* Define path for websocket */}}
|
|
|
|
{{- define "vaultwarden.websocket" -}}
|
|
|
|
path: "/notifications/hub"
|
|
|
|
# -- Ignored if not kubeVersion >= 1.14-0
|
|
|
|
pathType: Prefix
|
|
|
|
service:
|
|
|
|
# -- Overrides the service name reference for this path
|
|
|
|
name: ws
|
|
|
|
port: {{ .Values.service.ws.ports.ws.port }}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/* inject websocket path to all main ingress hosts*/}}
|
|
|
|
{{- define "vaultwarden.websocketinjector" -}}
|
|
|
|
{{- $path := list (include "vaultwarden.websocket" . | fromYaml) -}}
|
|
|
|
{{- if .Values.ingress.main.enabled }}
|
|
|
|
{{- range .Values.ingress.main.hosts }}
|
|
|
|
{{- $newpaths := list }}
|
|
|
|
{{- $newpaths := concat .paths $path }}
|
|
|
|
{{- $_ := set . "paths" ( deepCopy $newpaths ) -}}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/* inject websocket paths in ingress */}}
|
|
|
|
{{- include "vaultwarden.websocketinjector" . }}
|
|
|
|
|
|
|
|
{{/* Render the templates */}}
|
|
|
|
{{ include "common.all" . }}
|