From c0150d329ee00459edee0e95121f4136a4f45a9e Mon Sep 17 00:00:00 2001 From: Alexander Andryashin Date: Wed, 22 Jun 2022 21:18:27 +0300 Subject: [PATCH] Add ingress class name. --- moon2/templates/ingress.yaml | 10 ++++++++-- moon2/values.yaml | 5 +++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/moon2/templates/ingress.yaml b/moon2/templates/ingress.yaml index b6e59fb..4e2e3ba 100644 --- a/moon2/templates/ingress.yaml +++ b/moon2/templates/ingress.yaml @@ -10,7 +10,9 @@ metadata: name: {{ .Release.Name }} namespace: {{ .Release.Namespace }} spec: + {{- if .Values.customIngress.ingressClassName }} ingressClassName: {{ .Values.customIngress.ingressClassName }} + {{- end }} {{- if .Values.customIngress.tls }} tls: {{ toYaml .Values.customIngress.tls | nindent 4 }} @@ -132,7 +134,9 @@ spec: secretName: {{ $tlsSecretName }} {{- end }} {{- if not .Values.ingress.openshift }} - ingressClassName: nginx + {{- if .Values.ingress.ingressClassName }} + ingressClassName: {{ .Values.ingress.ingressClassName }} + {{- end }} {{- end }} rules: - host: {{ .Values.ingress.host }} @@ -214,7 +218,9 @@ metadata: {{- end }} spec: {{- if not .Values.ingress.openshift }} - ingressClassName: nginx + {{- if .Values.ingress.ingressClassName }} + ingressClassName: {{ .Values.ingress.ingressClassName }} + {{- end }} {{- end }} {{- if $enableTLS }} tls: diff --git a/moon2/values.yaml b/moon2/values.yaml index 820959b..161219f 100644 --- a/moon2/values.yaml +++ b/moon2/values.yaml @@ -38,6 +38,11 @@ ingress: ## host: moon.aerokube.local + ## + ## Ingress class name + ## + ingressClassName: nginx + ## ## Files with TLS certificate and TLS key. When provided Ingress switches to HTTPS-only mode. ## Set to empty files if you need HTTPS, but do not need to provide key and cert manually(i.g. use cert-manager)