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 |
Mohammed Naser | 65cda13 | 2024-05-02 14:34:08 -0400 | [diff] [blame] | 7 | namespace: {{ .Release.Namespace }} # namespace:cluster |
Mohammed Naser | b8eccd2 | 2023-02-10 05:55:56 +0000 | [diff] [blame] | 8 | {{- if .Values.ingress.dashboard.annotations }} |
| 9 | annotations: {{- toYaml .Values.ingress.dashboard.annotations | nindent 4 }} |
| 10 | {{- end }} |
| 11 | spec: |
| 12 | rules: |
| 13 | - host: {{ .Values.ingress.dashboard.host.name }} |
| 14 | http: |
| 15 | paths: |
| 16 | - path: {{ .Values.ingress.dashboard.host.path | default "/" }} |
| 17 | backend: |
| 18 | {{- if (eq "networking.k8s.io/v1" (include "capabilities.ingress.apiVersion" .)) }} |
| 19 | service: |
| 20 | name: rook-ceph-mgr-dashboard |
| 21 | port: |
| 22 | {{- if .Values.cephClusterSpec.dashboard.ssl }} |
| 23 | name: https-dashboard |
| 24 | {{- else }} |
| 25 | name: http-dashboard |
| 26 | {{- end }} |
| 27 | pathType: Prefix |
| 28 | {{- else }} |
| 29 | serviceName: rook-ceph-mgr-dashboard |
| 30 | {{- if .Values.cephClusterSpec.dashboard.ssl }} |
| 31 | servicePort: https-dashboard |
| 32 | {{- else }} |
| 33 | servicePort: http-dashboard |
| 34 | {{- end }} |
| 35 | {{- end }} |
| 36 | {{- if .Values.ingress.dashboard.ingressClassName }} |
| 37 | ingressClassName: {{ .Values.ingress.dashboard.ingressClassName }} |
| 38 | {{- end }} |
| 39 | {{- if .Values.ingress.dashboard.tls }} |
| 40 | tls: {{- toYaml .Values.ingress.dashboard.tls | nindent 4 }} |
| 41 | {{- end }} |
| 42 | {{- end }} |