use patched helm chart k8s-at-home/bitwardenrs

This commit is contained in:
ace
2021-01-18 19:38:16 +03:00
parent c26c7c66b0
commit 2cde98435f
17 changed files with 705 additions and 175 deletions

View File

@ -1,38 +1,52 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "bitwarden.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
{{- $svcPort := .Values.service.port -}}
{{- $websockets := .Values.bitwarden.websockets -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app.kubernetes.io/name: {{ include "bitwarden.name" . }}
helm.sh/chart: {{ include "bitwarden.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
{{- include "bitwarden.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . | quote }}
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
- path: {{ $ingressPath }}
{{- range .paths }}
- path: {{ . }}
backend:
serviceName: {{ $fullName }}
servicePort: http
servicePort: {{ $svcPort }}
{{- if $websockets.enabled }}
- path: {{ . | trimSuffix "/" }}/notifications/hub
backend:
serviceName: {{ $fullName }}
servicePort: {{ $websockets.port }}
- path: {{ . | trimSuffix "/" }}/notifications/hub/negotiate
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort}}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}