mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-18 02:33:15 +00:00
3f4cb6883e
Co-authored-by: houseme <housemecn@gmail.com>
54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
{{- if .Values.ingress.enabled -}}
|
|
{{- $ingressAnnotations := dict }}
|
|
{{- if eq .Values.ingress.className "nginx" }}
|
|
{{- $ingressAnnotations = .Values.ingress.nginxAnnotations }}
|
|
{{- else if eq .Values.ingress.className "traefik" }}
|
|
{{- $ingressAnnotations = .Values.ingress.traefikAnnotations }}
|
|
{{- else if eq .Values.ingress.className "" }}
|
|
{{- $ingressAnnotations = .Values.ingress.customAnnotations }}
|
|
{{- end }}
|
|
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 $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: {{ include "rustfs.fullname" $ }}-tls
|
|
{{- 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 }}
|