51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
|
{{- if .Values.console.ingress.enabled }}
|
||
|
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
|
||
|
apiVersion: networking.k8s.io/v1
|
||
|
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" -}}
|
||
|
apiVersion: networking.k8s.io/v1beta1
|
||
|
{{- else -}}
|
||
|
apiVersion: extensions/v1beta1
|
||
|
{{- end }}
|
||
|
kind: Ingress
|
||
|
metadata:
|
||
|
name: {{ include "minio-operator.console-fullname" . }}
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
{{- with .Values.console.ingress.labels }}
|
||
|
labels: {{ toYaml . | nindent 4 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.console.ingress.annotations }}
|
||
|
annotations: {{ toYaml . | nindent 4 }}
|
||
|
{{- end }}
|
||
|
spec:
|
||
|
{{- if .Values.console.ingress.ingressClassName }}
|
||
|
ingressClassName: {{ .Values.console.ingress.ingressClassName }}
|
||
|
{{- end }}
|
||
|
{{- if .Values.console.ingress.tls }}
|
||
|
tls:
|
||
|
{{- range .Values.console.ingress.tls }}
|
||
|
- hosts:
|
||
|
{{- range .hosts }}
|
||
|
- {{ . | quote }}
|
||
|
{{- end }}
|
||
|
secretName: {{ .secretName }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
rules:
|
||
|
- host: {{ .Values.console.ingress.host }}
|
||
|
http:
|
||
|
paths:
|
||
|
- path: {{ .Values.console.ingress.path }}
|
||
|
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
|
||
|
pathType: Prefix
|
||
|
backend:
|
||
|
service:
|
||
|
name: "console"
|
||
|
port:
|
||
|
name: http
|
||
|
{{- else }}
|
||
|
backend:
|
||
|
serviceName: "console"
|
||
|
servicePort: http
|
||
|
{{ end }}
|
||
|
{{ end }}
|