Mohammed Naser | b8eccd2 | 2023-02-10 05:55:56 +0000 | [diff] [blame] | 1 | {{- if .Values.ingress.dashboard.host }} |
| 2 | --- |
| 3 | apiVersion: {{ include "capabilities.ingress.apiVersion" . }} |
| 4 | kind: Ingress |
| 5 | metadata: |
| 6 | name: {{ template "clusterName" . }}-dashboard |
| 7 | {{- if .Values.ingress.dashboard.annotations }} |
| 8 | annotations: {{- toYaml .Values.ingress.dashboard.annotations | nindent 4 }} |
| 9 | {{- end }} |
| 10 | spec: |
| 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 }} |