From 3901f2da4dd354ab9973b36705068f075e1edbd0 Mon Sep 17 00:00:00 2001 From: fibbanachi <49879947+Programmeris@users.noreply.github.com> Date: Fri, 23 Dec 2022 18:36:15 +0300 Subject: [PATCH] Add logtostderr option in helm chart (#4080) --- k8s/helm_charts2/templates/filer-statefulset.yaml | 7 ++++++- k8s/helm_charts2/templates/master-statefulset.yaml | 7 ++++++- k8s/helm_charts2/templates/s3-deployment.yaml | 7 ++++++- k8s/helm_charts2/templates/volume-statefulset.yaml | 7 ++++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/k8s/helm_charts2/templates/filer-statefulset.yaml b/k8s/helm_charts2/templates/filer-statefulset.yaml index 978cdeec8..ad1325609 100644 --- a/k8s/helm_charts2/templates/filer-statefulset.yaml +++ b/k8s/helm_charts2/templates/filer-statefulset.yaml @@ -101,7 +101,12 @@ spec: - "/bin/sh" - "-ec" - | - exec /usr/bin/weed -logdir=/logs \ + exec /usr/bin/weed \ + {{- if eq .Values.filer.logs.type "hostPath" }} + -logdir=/logs \ + {{- else }} + -logtostderr=true \ + {{- end }} {{- if .Values.filer.loggingOverrideLevel }} -v={{ .Values.filer.loggingOverrideLevel }} \ {{- else }} diff --git a/k8s/helm_charts2/templates/master-statefulset.yaml b/k8s/helm_charts2/templates/master-statefulset.yaml index c31962036..1584387fd 100644 --- a/k8s/helm_charts2/templates/master-statefulset.yaml +++ b/k8s/helm_charts2/templates/master-statefulset.yaml @@ -90,7 +90,12 @@ spec: - "/bin/sh" - "-ec" - | - exec /usr/bin/weed -logdir=/logs \ + exec /usr/bin/weed \ + {{- if eq .Values.master.logs.type "hostPath" }} + -logdir=/logs \ + {{- else }} + -logtostderr=true \ + {{- end }} {{- if .Values.master.loggingOverrideLevel }} -v={{ .Values.master.loggingOverrideLevel }} \ {{- else }} diff --git a/k8s/helm_charts2/templates/s3-deployment.yaml b/k8s/helm_charts2/templates/s3-deployment.yaml index c9e12e9cb..a13c0790a 100644 --- a/k8s/helm_charts2/templates/s3-deployment.yaml +++ b/k8s/helm_charts2/templates/s3-deployment.yaml @@ -72,7 +72,12 @@ spec: - "/bin/sh" - "-ec" - | - exec /usr/bin/weed -logdir=/logs \ + exec /usr/bin/weed \ + {{- if eq .Values.s3.logs.type "hostPath" }} + -logdir=/logs \ + {{- else }} + -logtostderr=true \ + {{- end }} {{- if .Values.s3.loggingOverrideLevel }} -v={{ .Values.s3.loggingOverrideLevel }} \ {{- else }} diff --git a/k8s/helm_charts2/templates/volume-statefulset.yaml b/k8s/helm_charts2/templates/volume-statefulset.yaml index 55431f477..86592252f 100644 --- a/k8s/helm_charts2/templates/volume-statefulset.yaml +++ b/k8s/helm_charts2/templates/volume-statefulset.yaml @@ -93,7 +93,12 @@ spec: - "/bin/sh" - "-ec" - | - exec /usr/bin/weed -logdir=/logs \ + exec /usr/bin/weed \ + {{- if eq .Values.volume.logs.type "hostPath" }} + -logdir=/logs \ + {{- else }} + -logtostderr=true \ + {{- end }} {{- if .Values.volume.loggingOverrideLevel }} -v={{ .Values.volume.loggingOverrideLevel }} \ {{- else }}