Skip to content

Commit

Permalink
Merge pull request #185 from applike-ss/add-container-lifecycle
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehipwell committed Nov 29, 2021
2 parents 986a808 + 13cdc90 commit e7e56cd
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/fluent-bit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
4 changes: 4 additions & 0 deletions charts/fluent-bit/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ containers:
protocol: {{ .protocol }}
{{- end }}
{{- end }}
{{- with .Values.lifecycle }}
lifecycle:
{{- toYaml . | nindent 6 }}
{{- end }}
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: 1 addition & 1 deletion charts/fluentd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
4 changes: 4 additions & 0 deletions charts/fluentd/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ containers:
containerPort: {{ $port.containerPort }}
protocol: {{ $port.protocol }}
{{- end }}
{{- with .Values.lifecycle }}
lifecycle:
{{- toYaml . | nindent 6 }}
{{- end }}
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 e7e56cd

Please sign in to comment.