blob: 883d8a48f6dd0db1f3be4fdd754ed4269d1a33fc [file] [log] [blame] [edit]
{{- 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 }}