* ingress config * fixing issues * prefix path type For the S3 ingress path /, using pathType: Prefix is more explicit and standard-compliant for matching all subpaths. While ImplementationSpecific might work similarly with your current Ingress controller (often defaulting to a prefix match when use-regex is not enabled), Prefix clearly states the intent and improves portability across different Ingress controllers. --------- Co-authored-by: Philipp Kraus <philipp.kraus@flashpixx.de> Co-authored-by: Chris Lu <chris.lu@gmail.com>
49 lines
1.7 KiB
YAML
49 lines
1.7 KiB
YAML
{{- if .Values.master.enabled }}
|
|
{{- if .Values.master.ingress.enabled }}
|
|
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
|
|
apiVersion: networking.k8s.io/v1
|
|
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}
|
|
apiVersion: networking.k8s.io/v1beta1
|
|
{{- else }}
|
|
apiVersion: extensions/v1beta1
|
|
{{- end }}
|
|
kind: Ingress
|
|
metadata:
|
|
name: ingress-{{ template "seaweedfs.name" . }}-master
|
|
namespace: {{ .Release.Namespace }}
|
|
{{- with .Values.master.ingress.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
|
|
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/component: master
|
|
spec:
|
|
ingressClassName: {{ .Values.master.ingress.className | quote }}
|
|
tls:
|
|
{{ .Values.master.ingress.tls | default list | toYaml | nindent 6 }}
|
|
rules:
|
|
- http:
|
|
paths:
|
|
- path: {{ .Values.master.ingress.path | quote }}
|
|
pathType: {{ .Values.master.ingress.pathType | quote }}
|
|
backend:
|
|
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
|
|
service:
|
|
name: {{ template "seaweedfs.name" . }}-master
|
|
port:
|
|
number: {{ .Values.master.port }}
|
|
#name:
|
|
{{- else }}
|
|
serviceName: {{ template "seaweedfs.name" . }}-master
|
|
servicePort: {{ .Values.master.port }}
|
|
{{- end }}
|
|
{{- if .Values.filer.ingress.host }}
|
|
host: {{ .Values.master.ingress.host }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|