From 3d45ecd326c42533a8fc8b40a9310f55d182adb7 Mon Sep 17 00:00:00 2001 From: Dmitriy Pavlov Date: Sun, 27 Aug 2023 23:53:28 +0300 Subject: [PATCH] [helm] fix log to stderr and default host for ingress (#4787) --- k8s/charts/seaweedfs/templates/ingress.yaml | 12 ++++++++---- k8s/charts/seaweedfs/templates/s3-deployment.yaml | 2 ++ k8s/charts/seaweedfs/values.yaml | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/k8s/charts/seaweedfs/templates/ingress.yaml b/k8s/charts/seaweedfs/templates/ingress.yaml index ab46253fd..183cf1a23 100644 --- a/k8s/charts/seaweedfs/templates/ingress.yaml +++ b/k8s/charts/seaweedfs/templates/ingress.yaml @@ -17,8 +17,7 @@ spec: tls: {{ .Values.filer.ingress.tls | default list | toYaml | nindent 6}} rules: - - host: {{ .Values.filer.ingress.host }} - http: + - http: paths: - path: /sw-filer/?(.*) pathType: ImplementationSpecific @@ -33,6 +32,9 @@ spec: serviceName: {{ template "seaweedfs.name" . }}-filer servicePort: {{ .Values.filer.port }} {{- end }} +{{- if .Values.filer.ingress.host }} + host: {{ .Values.filer.ingress.host }} +{{- end }} {{- end }} --- {{- if .Values.master.ingress.enabled }} @@ -52,8 +54,7 @@ metadata: spec: ingressClassName: {{ .Values.master.ingress.className | quote }} rules: - - host: {{ .Values.master.ingress.host }} - http: + - http: paths: - path: /sw-master/?(.*) pathType: ImplementationSpecific @@ -68,4 +69,7 @@ spec: serviceName: {{ template "seaweedfs.name" . }}-master servicePort: {{ .Values.master.port }} {{- end }} +{{- if .Values.filer.ingress.host }} + host: {{ .Values.master.ingress.host }} +{{- end }} {{- end }} diff --git a/k8s/charts/seaweedfs/templates/s3-deployment.yaml b/k8s/charts/seaweedfs/templates/s3-deployment.yaml index d0d56d0ef..2040e7161 100644 --- a/k8s/charts/seaweedfs/templates/s3-deployment.yaml +++ b/k8s/charts/seaweedfs/templates/s3-deployment.yaml @@ -107,8 +107,10 @@ spec: {{- end }} -filer={{ template "seaweedfs.name" . }}-filer-client.{{ .Release.Namespace }}:{{ .Values.filer.port }} volumeMounts: + {{- if eq .Values.s3.logs.type "hostPath" }} - name: logs mountPath: "/logs/" + {{- end }} - mountPath: /etc/sw name: config-users readOnly: true diff --git a/k8s/charts/seaweedfs/values.yaml b/k8s/charts/seaweedfs/values.yaml index 8a4148102..165be23f3 100644 --- a/k8s/charts/seaweedfs/values.yaml +++ b/k8s/charts/seaweedfs/values.yaml @@ -127,6 +127,7 @@ master: ingress: enabled: false className: "nginx" + # host: false for "*" hostname host: "master.seaweedfs.local" annotations: nginx.ingress.kubernetes.io/auth-type: "basic" @@ -375,6 +376,7 @@ filer: ingress: enabled: false className: "nginx" + # host: false for "*" hostname host: "seaweedfs.cluster.local" annotations: nginx.ingress.kubernetes.io/backend-protocol: GRPC