| {{- if .Values.ingress.dashboard.host }} |
| --- |
| apiVersion: {{ include "capabilities.ingress.apiVersion" . }} |
| kind: Ingress |
| metadata: |
| name: {{ template "clusterName" . }}-dashboard |
| namespace: {{ .Release.Namespace }} # namespace:cluster |
| {{- if .Values.ingress.dashboard.annotations }} |
| annotations: {{- toYaml .Values.ingress.dashboard.annotations | nindent 4 }} |
| {{- end }} |
| spec: |
| rules: |
| - host: {{ .Values.ingress.dashboard.host.name }} |
| http: |
| paths: |
| - path: {{ .Values.ingress.dashboard.host.path | default "/" }} |
| backend: |
| {{- if (eq "networking.k8s.io/v1" (include "capabilities.ingress.apiVersion" .)) }} |
| service: |
| name: rook-ceph-mgr-dashboard |
| port: |
| {{- if .Values.cephClusterSpec.dashboard.ssl }} |
| name: https-dashboard |
| {{- else }} |
| 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.ingressClassName }} |
| ingressClassName: {{ .Values.ingress.dashboard.ingressClassName }} |
| {{- end }} |
| {{- if .Values.ingress.dashboard.tls }} |
| tls: {{- toYaml .Values.ingress.dashboard.tls | nindent 4 }} |
| {{- end }} |
| {{- end }} |