2021-09-28 12:08:54 +00:00
|
|
|
{{- if .Values.filer.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 }}
|
2020-03-03 07:56:39 +00:00
|
|
|
apiVersion: extensions/v1beta1
|
2021-09-28 12:08:54 +00:00
|
|
|
{{- end }}
|
2020-03-03 07:56:39 +00:00
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
2021-09-28 12:08:54 +00:00
|
|
|
name: ingress-{{ template "seaweedfs.name" . }}-filer
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
annotations:
|
|
|
|
{{ omit .Values.filer.ingress.annotations "kubernetes.io/ingress.class" | toYaml | nindent 4 }}
|
2020-03-03 07:56:39 +00:00
|
|
|
spec:
|
2021-09-28 12:08:54 +00:00
|
|
|
ingressClassName: {{ .Values.filer.ingress.className | quote }}
|
|
|
|
rules:
|
|
|
|
- http:
|
|
|
|
paths:
|
|
|
|
- path: /sw-filer/?(.*)
|
|
|
|
pathType: ImplementationSpecific
|
|
|
|
backend:
|
|
|
|
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
|
|
|
|
service:
|
|
|
|
name: {{ template "seaweedfs.name" . }}-filer
|
|
|
|
port:
|
|
|
|
number: {{ .Values.filer.port }}
|
|
|
|
#name:
|
|
|
|
{{- else }}
|
|
|
|
serviceName: {{ template "seaweedfs.name" . }}-filer
|
|
|
|
servicePort: {{ .Values.filer.port }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2020-03-03 07:56:39 +00:00
|
|
|
---
|
2021-09-28 12:08:54 +00:00
|
|
|
{{- 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 }}
|
2020-03-03 07:56:39 +00:00
|
|
|
apiVersion: extensions/v1beta1
|
2021-09-28 12:08:54 +00:00
|
|
|
{{- end }}
|
2020-03-03 07:56:39 +00:00
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: ingress-{{ template "seaweedfs.name" . }}-master
|
2021-10-03 16:34:47 +00:00
|
|
|
namespace: {{ .Release.Namespace }}
|
2020-03-03 07:56:39 +00:00
|
|
|
annotations:
|
2021-09-28 12:08:54 +00:00
|
|
|
{{ omit .Values.master.ingress.annotations "kubernetes.io/ingress.class" | toYaml | nindent 4 }}
|
2020-03-03 07:56:39 +00:00
|
|
|
spec:
|
2021-09-28 12:08:54 +00:00
|
|
|
ingressClassName: {{ .Values.master.ingress.className | quote }}
|
2020-03-03 07:56:39 +00:00
|
|
|
rules:
|
|
|
|
- http:
|
|
|
|
paths:
|
|
|
|
- path: /sw-master/?(.*)
|
2021-09-28 12:08:54 +00:00
|
|
|
pathType: ImplementationSpecific
|
2020-03-03 07:56:39 +00:00
|
|
|
backend:
|
2021-09-28 12:08:54 +00:00
|
|
|
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
|
|
|
|
service:
|
|
|
|
name: {{ template "seaweedfs.name" . }}-master
|
|
|
|
port:
|
|
|
|
number: {{ .Values.master.port }}
|
|
|
|
#name:
|
|
|
|
{{- else }}
|
2020-03-03 07:56:39 +00:00
|
|
|
serviceName: {{ template "seaweedfs.name" . }}-master
|
|
|
|
servicePort: {{ .Values.master.port }}
|
2021-09-28 12:08:54 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|