fix(chart): ingress shorten names with variables + ingressClassName

This commit is contained in:
Grraahaam
2023-03-13 19:51:16 +01:00
parent 00feee6903
commit 9db69430b5
+10 -8
View File
@@ -1,16 +1,18 @@
{{ if .Values.ingress.enabled }} {{ if .Values.ingress.enabled }}
{{- $ingress := .Values.ingress }}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: infisical-ingress name: infisical-ingress
{{- with .Values.ingress.annotations }} {{- with $ingress.annotations }}
annotations: annotations:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
spec: spec:
{{- if .Values.ingress.tls }} ingressClassName: {{ $ingress.ingressClassName | default "nginx"}}
{{- if $ingress.tls }}
tls: tls:
{{- range .Values.ingress.tls }} {{- range $ingress.tls }}
- hosts: - hosts:
{{- range .hosts }} {{- range .hosts }}
- {{ . | quote }} - {{ . | quote }}
@@ -19,18 +21,18 @@ spec:
{{- end }} {{- end }}
{{- end }} {{- end }}
rules: rules:
- host: {{ .Values.ingress.hostName}} - host: {{ $ingress.hostName}}
http: http:
paths: paths:
- path: {{ .Values.ingress.frontend.path }} - path: {{ $ingress.frontend.path }}
pathType: {{ .Values.ingress.frontend.pathType }} pathType: {{ $ingress.frontend.pathType }}
backend: backend:
service: service:
name: {{ include "infisical.frontend.fullname" . }} name: {{ include "infisical.frontend.fullname" . }}
port: port:
number: 3000 number: 3000
- path: {{ .Values.ingress.backend.path }} - path: {{ $ingress.backend.path }}
pathType: {{ .Values.ingress.backend.pathType }} pathType: {{ $ingress.backend.pathType }}
backend: backend:
service: service:
name: {{ include "infisical.backend.fullname" . }} name: {{ include "infisical.backend.fullname" . }}