123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- {{- /*
- Copyright VMware, Inc.
- SPDX-License-Identifier: APACHE-2.0
- */}}
- {{- if and .Values.ingress.enabled (not .Values.disableWebUI ) -}}
- apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
- kind: Ingress
- metadata:
- name: {{ include "common.names.fullname" . }}
- namespace: {{ include "common.names.namespace" . | quote }}
- labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
- {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list (include "minio.ingress.annotations" . | fromYaml) .Values.commonAnnotations ) "context" . ) }}
- {{- if $annotations }}
- annotations: {{- include "common.tplvalues.render" (dict "value" $annotations "context" $) | nindent 4 }}
- {{- end }}
- spec:
- {{- if and .Values.ingress.ingressClassName (include "common.ingress.supportsIngressClassname" .) }}
- ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
- {{- end }}
- rules:
- {{- if (include "minio.ingress.hostname" .) }}
- - host: {{ include "minio.ingress.hostname" . }}
- http:
- paths:
- {{- if .Values.ingress.extraPaths }}
- {{- toYaml .Values.ingress.extraPaths | nindent 10 }}
- {{- end }}
- - path: {{ .Values.ingress.path }}
- {{- if eq "true" (include "common.ingress.supportsPathType" .) }}
- pathType: {{ .Values.ingress.pathType }}
- {{- end }}
- backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" .) "servicePort" "minio-console" "context" $) | nindent 14 }}
- {{- end }}
- {{- range .Values.ingress.extraHosts }}
- - host: {{ .name | quote }}
- http:
- paths:
- - path: {{ default "/" .path }}
- {{- if eq "true" (include "common.ingress.supportsPathType" $) }}
- pathType: {{ default "ImplementationSpecific" .pathType }}
- {{- end }}
- backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" "minio-console" "context" $) | nindent 14 }}
- {{- end }}
- {{- if .Values.ingress.extraRules }}
- {{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraRules "context" $) | nindent 4 }}
- {{- end }}
- {{- $annotationsMap := include "common.tplvalues.render" (dict "value" $annotations "context" $) | fromYaml }}
- {{- if or (and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" $annotationsMap )) .Values.ingress.selfSigned)) .Values.ingress.extraTls }}
- tls:
- {{- if and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" $annotationsMap )) .Values.ingress.selfSigned) }}
- - hosts:
- - {{ include "minio.ingress.hostname" . }}
- secretName: {{ printf "%s-tls" (include "minio.ingress.hostname" .) }}
- {{- end }}
- {{- if .Values.ingress.extraTls }}
- {{- include "common.tplvalues.render" ( dict "value" .Values.ingress.extraTls "context" $ ) | nindent 4 }}
- {{- end }}
- {{- end }}
- {{- end }}
|