From d52a623f831f76f76a49e3dcb1bb347653135bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Stru=C3=9F?= Date: Fri, 26 Nov 2021 09:26:01 +0100 Subject: [PATCH 1/2] add(fluentd,fluent-bit): added lifecycle object MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sebastian Struß --- charts/fluent-bit/Chart.yaml | 2 +- charts/fluent-bit/templates/_pod.tpl | 2 ++ charts/fluent-bit/values.yaml | 5 +++++ charts/fluentd/Chart.yaml | 2 +- charts/fluentd/templates/_pod.tpl | 2 ++ charts/fluentd/values.yaml | 7 +++++++ 6 files changed, 18 insertions(+), 2 deletions(-) diff --git a/charts/fluent-bit/Chart.yaml b/charts/fluent-bit/Chart.yaml index 0c5237dd..c0195e59 100644 --- a/charts/fluent-bit/Chart.yaml +++ b/charts/fluent-bit/Chart.yaml @@ -5,7 +5,7 @@ keywords: - logging - fluent-bit - fluentd -version: 0.19.6 +version: 0.19.7 appVersion: 1.8.10 icon: https://fluentbit.io/assets/img/logo1-default.png home: https://fluentbit.io/ diff --git a/charts/fluent-bit/templates/_pod.tpl b/charts/fluent-bit/templates/_pod.tpl index 9c472a33..72679312 100644 --- a/charts/fluent-bit/templates/_pod.tpl +++ b/charts/fluent-bit/templates/_pod.tpl @@ -64,6 +64,8 @@ containers: protocol: {{ .protocol }} {{- end }} {{- end }} + lifecycle: + {{- toYaml .Values.lifecycle | nindent 6 }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 6 }} readinessProbe: diff --git a/charts/fluent-bit/values.yaml b/charts/fluent-bit/values.yaml index e138f725..60139e11 100644 --- a/charts/fluent-bit/values.yaml +++ b/charts/fluent-bit/values.yaml @@ -123,6 +123,11 @@ dashboards: labelKey: grafana_dashboard annotations: {} +lifecycle: {} + # preStop: + # exec: + # command: ["/bin/sh", "-c", "sleep 20"] + livenessProbe: httpGet: path: / diff --git a/charts/fluentd/Chart.yaml b/charts/fluentd/Chart.yaml index 5de68281..c18df719 100644 --- a/charts/fluentd/Chart.yaml +++ b/charts/fluentd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: fluentd description: A Helm chart for Kubernetes # type: application -version: 0.3.0 +version: 0.3.1 appVersion: v1.12.0 icon: https://www.fluentd.org/images/miscellany/fluentd-logo_2x.png home: https://www.fluentd.org/ diff --git a/charts/fluentd/templates/_pod.tpl b/charts/fluentd/templates/_pod.tpl index b96cd194..51bb7465 100644 --- a/charts/fluentd/templates/_pod.tpl +++ b/charts/fluentd/templates/_pod.tpl @@ -43,6 +43,8 @@ containers: containerPort: {{ $port.containerPort }} protocol: {{ $port.protocol }} {{- end }} + lifecycle: + {{- toYaml .Values.lifecycle | nindent 6 }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 6 }} readinessProbe: diff --git a/charts/fluentd/values.yaml b/charts/fluentd/values.yaml index 8d53327c..00b72395 100644 --- a/charts/fluentd/values.yaml +++ b/charts/fluentd/values.yaml @@ -46,6 +46,13 @@ securityContext: {} # runAsNonRoot: true # runAsUser: 1000 +# Configure the livecycle +# Ref: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/ +lifecycle: {} + # preStop: + # exec: + # command: ["/bin/sh", "-c", "sleep 20"] + # Configure the livessProbe # Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ livenessProbe: From 13cdc90f83f32d04f516f4a1d35d4954e48e6fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Stru=C3=9F?= Date: Mon, 29 Nov 2021 16:21:39 +0100 Subject: [PATCH 2/2] review fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sebastian Struß --- charts/fluent-bit/templates/_pod.tpl | 4 +++- charts/fluentd/templates/_pod.tpl | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/charts/fluent-bit/templates/_pod.tpl b/charts/fluent-bit/templates/_pod.tpl index 72679312..9f9e1453 100644 --- a/charts/fluent-bit/templates/_pod.tpl +++ b/charts/fluent-bit/templates/_pod.tpl @@ -64,8 +64,10 @@ containers: protocol: {{ .protocol }} {{- end }} {{- end }} + {{- with .Values.lifecycle }} lifecycle: - {{- toYaml .Values.lifecycle | nindent 6 }} + {{- toYaml . | nindent 6 }} + {{- end }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 6 }} readinessProbe: diff --git a/charts/fluentd/templates/_pod.tpl b/charts/fluentd/templates/_pod.tpl index 51bb7465..f96afa3d 100644 --- a/charts/fluentd/templates/_pod.tpl +++ b/charts/fluentd/templates/_pod.tpl @@ -43,8 +43,10 @@ containers: containerPort: {{ $port.containerPort }} protocol: {{ $port.protocol }} {{- end }} + {{- with .Values.lifecycle }} lifecycle: - {{- toYaml .Values.lifecycle | nindent 6 }} + {{- toYaml . | nindent 6 }} + {{- end }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 6 }} readinessProbe: