mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-09 06:39:25 +00:00
73e6542eea
Co-authored-by: cxymds <Cxymds@qq.com> Co-authored-by: houseme <housemecn@gmail.com>
50 lines
1.4 KiB
YAML
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 }}
|