mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 18:28:12 +00:00
fix(chart): ingress shorten names with variables + ingressClassName
This commit is contained in:
@@ -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" . }}
|
||||||
|
|||||||
Reference in New Issue
Block a user