mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-18 18:46:17 +00:00
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
{{- if .Values.ingress.enabled -}}
|
|
{{- $secretName := .Values.ingress.tls.secretName }}
|
|
{{- $ingressAnnotations := dict }}
|
|
{{- if eq .Values.ingress.className "nginx" }}
|
|
{{- $ingressAnnotations = .Values.ingress.nginxAnnotations }}
|
|
{{- else if eq .Values.ingress.className "" }}
|
|
{{- $ingressAnnotations = .Values.ingress.customAnnotations }}
|
|
{{- end }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ include "rustfs.fullname" . }}
|
|
labels:
|
|
{{- include "rustfs.labels" . | nindent 4 }}
|
|
{{- with .Values.commonLabels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- with $ingressAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.ingress.className }}
|
|
ingressClassName: {{ . }}
|
|
{{- end }}
|
|
{{- if .Values.ingress.tls.enabled }}
|
|
tls:
|
|
- hosts:
|
|
{{- range .Values.ingress.hosts }}
|
|
- {{ .host | quote }}
|
|
{{- end }}
|
|
secretName: {{ $secretName }}
|
|
{{- end }}
|
|
rules:
|
|
{{- range .Values.ingress.hosts }}
|
|
- host: {{ .host | quote }}
|
|
http:
|
|
paths:
|
|
{{- range .paths }}
|
|
- path: {{ .path }}
|
|
{{- with .pathType }}
|
|
pathType: {{ . }}
|
|
{{- end }}
|
|
backend:
|
|
service:
|
|
name: {{ include "rustfs.fullname" $ }}-svc
|
|
port:
|
|
name: console
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|