blob: 4cf4c42cab21013268daa4b161306d04e6558930 [file] [log] [blame]
Mohammed Naserb8eccd22023-02-10 05:55:56 +00001{{- if .Values.ingress.dashboard.host }}
2---
3apiVersion: {{ include "capabilities.ingress.apiVersion" . }}
4kind: Ingress
5metadata:
6 name: {{ template "clusterName" . }}-dashboard
7 {{- if .Values.ingress.dashboard.annotations }}
8 annotations: {{- toYaml .Values.ingress.dashboard.annotations | nindent 4 }}
9 {{- end }}
10spec:
11 rules:
12 - host: {{ .Values.ingress.dashboard.host.name }}
13 http:
14 paths:
15 - path: {{ .Values.ingress.dashboard.host.path | default "/" }}
16 backend:
17{{- if (eq "networking.k8s.io/v1" (include "capabilities.ingress.apiVersion" .)) }}
18 service:
19 name: rook-ceph-mgr-dashboard
20 port:
21 {{- if .Values.cephClusterSpec.dashboard.ssl }}
22 name: https-dashboard
23 {{- else }}
24 name: http-dashboard
25 {{- end }}
26 pathType: Prefix
27{{- else }}
28 serviceName: rook-ceph-mgr-dashboard
29 {{- if .Values.cephClusterSpec.dashboard.ssl }}
30 servicePort: https-dashboard
31 {{- else }}
32 servicePort: http-dashboard
33 {{- end }}
34{{- end }}
35 {{- if .Values.ingress.dashboard.ingressClassName }}
36 ingressClassName: {{ .Values.ingress.dashboard.ingressClassName }}
37 {{- end }}
38 {{- if .Values.ingress.dashboard.tls }}
39 tls: {{- toYaml .Values.ingress.dashboard.tls | nindent 4 }}
40 {{- end }}
41{{- end }}