From ca32fd16a88060d97550c44d538fc23857d9ed44 Mon Sep 17 00:00:00 2001 From: Tom Hellier Date: Wed, 1 Dec 2021 23:39:48 +0000 Subject: [PATCH] helm: use a more explicit value for ingress The networking.k8s.io/v1 api defines the backend differently to networking.k8s.io/v1beta1 and extensions/v1beta1 Signed-off-by: Tom Hellier (cherry picked from commit 2ca93e547c1e14c131b28c848b5ecd2ee20aeb9b) --- .../rook-ceph-cluster/templates/ingress.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/deploy/charts/rook-ceph-cluster/templates/ingress.yaml b/deploy/charts/rook-ceph-cluster/templates/ingress.yaml index 078693288b93..c392e5fdecca 100644 --- a/deploy/charts/rook-ceph-cluster/templates/ingress.yaml +++ b/deploy/charts/rook-ceph-cluster/templates/ingress.yaml @@ -14,14 +14,7 @@ spec: paths: - path: {{ .Values.ingress.dashboard.host.path | default "/" }} backend: -{{- if (semverCompare "<1.18-0" (include "capabilities.kubeVersion" .)) }} - serviceName: rook-ceph-mgr-dashboard - {{- if .Values.cephClusterSpec.dashboard.ssl }} - servicePort: https-dashboard - {{- else }} - servicePort: http-dashboard - {{- end }} -{{- else }} +{{- if (eq "networking.k8s.io/v1" (include "capabilities.ingress.apiVersion" .)) }} service: name: rook-ceph-mgr-dashboard port: @@ -31,6 +24,13 @@ spec: name: http-dashboard {{- end }} pathType: Prefix +{{- else }} + serviceName: rook-ceph-mgr-dashboard + {{- if .Values.cephClusterSpec.dashboard.ssl }} + servicePort: https-dashboard + {{- else }} + servicePort: http-dashboard + {{- end }} {{- end }} {{- if .Values.ingress.dashboard.tls }} tls: {{- toYaml .Values.ingress.dashboard.tls | nindent 4 }}