Files
rustfs/helm/rustfs/templates/ingress.yaml
T
2026-04-15 10:16:10 +00:00

50 lines
1.4 KiB
YAML

{{- if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "rustfs.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "rustfs.labels" . | nindent 4 }}
{{- with .Values.commonLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with (include "rustfs.ingressAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.ingress.className }}
ingressClassName: {{ . }}
{{- end }}
{{- if .Values.ingress.tls.enabled }}
tls:
- hosts:
{{- range .Values.ingress.hosts }}
- {{ .host | quote }}
{{- end }}
{{- if .Values.ingress.tls.existingSecret.enabled }}
secretName: {{ required "ingress.tls.existingSecret.name must be set when ingress.tls.existingSecret.enabled is true" .Values.ingress.tls.existingSecret.name }}
{{- else }}
secretName: {{ include "rustfs.fullname" $ }}-tls
{{- end }}
{{- 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 }}