Skip to content

Commit

Permalink
add(fluentd,fluent-bit): added lifecycle object
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Struß <struss@justdice.io>
  • Loading branch information
applike-ss committed Nov 26, 2021
1 parent 986a808 commit 285bb42
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/fluent-bit/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ containers:
protocol: {{ .protocol }}
{{- end }}
{{- end }}
lifecycle:
{{- toYaml .Values.lifecycle | nindent 6 }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 6 }}
readinessProbe:
Expand Down
5 changes: 5 additions & 0 deletions charts/fluent-bit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ dashboards:
labelKey: grafana_dashboard
annotations: {}

lifecycle: {}
# preStop:
# exec:
# command: ["/bin/sh", "-c", "sleep 20"]

livenessProbe:
httpGet:
path: /
Expand Down
2 changes: 2 additions & 0 deletions charts/fluentd/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions charts/fluentd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 285bb42

Please sign in to comment.