Skip to content

Commit

Permalink
helm: use a more explicit value for ingress
Browse files Browse the repository at this point in the history
The networking.k8s.io/v1 api defines the backend differently
to networking.k8s.io/v1beta1 and extensions/v1beta1

Signed-off-by: Tom Hellier <me@tomhellier.com>
  • Loading branch information
TomHellier committed Nov 30, 2021
1 parent 4084f17 commit cf5601f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions deploy/charts/rook-ceph-cluster/templates/ingress.yaml
Expand Up @@ -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:
Expand All @@ -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 }}
Expand Down

0 comments on commit cf5601f

Please sign in to comment.