mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 19:26:38 +00:00
fix(chart): ingressClassName cross-version compatibility
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
{{ if .Values.ingress.enabled }}
|
{{ if .Values.ingress.enabled }}
|
||||||
{{- $ingress := .Values.ingress }}
|
{{- $ingress := .Values.ingress }}
|
||||||
|
{{- if and $ingress.ingressClassName (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
|
||||||
|
{{- if not (hasKey $ingress.annotations "kubernetes.io/ingress.class") }}
|
||||||
|
{{- $_ := set $ingress.annotations "kubernetes.io/ingress.class" $ingress.ingressClassName}}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
@@ -9,7 +14,9 @@ metadata:
|
|||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: {{ $ingress.ingressClassName | default "nginx"}}
|
{{- if and $ingress.ingressClassName (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
|
||||||
|
ingressClassName: {{ $ingress.ingressClassName | default "nginx" }}
|
||||||
|
{{- end }}
|
||||||
{{- if $ingress.tls }}
|
{{- if $ingress.tls }}
|
||||||
tls:
|
tls:
|
||||||
{{- range $ingress.tls }}
|
{{- range $ingress.tls }}
|
||||||
|
|||||||
@@ -256,10 +256,13 @@ ingress:
|
|||||||
## @param ingress.enabled Enable ingress
|
## @param ingress.enabled Enable ingress
|
||||||
##
|
##
|
||||||
enabled: true
|
enabled: true
|
||||||
annotations:
|
## @param mailhog.ingress.ingressClassName Ingress class name
|
||||||
## @skip ingress.annotations.kubernetes.io/ingress.class
|
##
|
||||||
##
|
ingressClassName: nginx
|
||||||
kubernetes.io/ingress.class: "nginx"
|
## @param mailhog.ingress.annotations Ingress annotations
|
||||||
|
##
|
||||||
|
annotations: {}
|
||||||
|
# kubernetes.io/ingress.class: "nginx"
|
||||||
# cert-manager.io/issuer: letsencrypt-nginx
|
# cert-manager.io/issuer: letsencrypt-nginx
|
||||||
## @param ingress.hostName Ingress hostname (your custom domain name)
|
## @param ingress.hostName Ingress hostname (your custom domain name)
|
||||||
## Replace with your own domain
|
## Replace with your own domain
|
||||||
@@ -351,8 +354,7 @@ mailhog:
|
|||||||
ingressClassName: nginx
|
ingressClassName: nginx
|
||||||
## @param mailhog.ingress.annotations Ingress annotations
|
## @param mailhog.ingress.annotations Ingress annotations
|
||||||
##
|
##
|
||||||
annotations:
|
annotations: {}
|
||||||
{}
|
|
||||||
# kubernetes.io/ingress.class: nginx
|
# kubernetes.io/ingress.class: nginx
|
||||||
# kubernetes.io/tls-acme: "true"
|
# kubernetes.io/tls-acme: "true"
|
||||||
## @param mailhog.ingress.labels Ingress labels
|
## @param mailhog.ingress.labels Ingress labels
|
||||||
|
|||||||
Reference in New Issue
Block a user