diff --git a/stable/fluent-bit/Chart.yaml b/stable/fluent-bit/Chart.yaml
index 0561779fc7..667edc328b 100755
--- a/stable/fluent-bit/Chart.yaml
+++ b/stable/fluent-bit/Chart.yaml
@@ -1,6 +1,6 @@
apiVersion: v1
name: fluent-bit
-version: 2.4.0
+version: 2.4.1
appVersion: 1.2.1
description: Fast and Lightweight Log/Data Forwarder for Linux, BSD and OSX
keywords:
diff --git a/stable/fluent-bit/README.md b/stable/fluent-bit/README.md
index d3f793326e..72bcf3fb5f 100644
--- a/stable/fluent-bit/README.md
+++ b/stable/fluent-bit/README.md
@@ -119,6 +119,8 @@ The following table lists the configurable parameters of the Fluent-Bit chart an
| `serviceAccount.name` | The name of the ServiceAccount to use. | `NULL` |
| `rawConfig` | Raw contents of fluent-bit.conf | `@INCLUDE fluent-bit-service.conf`
`@INCLUDE fluent-bit-input.conf`
`@INCLUDE fluent-bit-filter.conf`
` @INCLUDE fluent-bit-output.conf` |
| `resources` | Pod resource requests & limits | `{}` |
+| `securityContext` | [Security settings for a container](https://kubernetes.io/docs/concepts/policy/security-context) | `{}` |
+| `podSecurityContext` | [Security settings for a pod](https://kubernetes.io/docs/concepts/policy/security-context) | `{}` |
| `hostNetwork` | Use host's network | `false` |
| `dnsPolicy` | Specifies the dnsPolicy to use | `ClusterFirst` |
| `priorityClassName` | Specifies the priorityClassName to use | `NULL` |
diff --git a/stable/fluent-bit/templates/daemonset.yaml b/stable/fluent-bit/templates/daemonset.yaml
index 7fc63bdddc..7d8e543318 100644
--- a/stable/fluent-bit/templates/daemonset.yaml
+++ b/stable/fluent-bit/templates/daemonset.yaml
@@ -24,6 +24,10 @@ spec:
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
spec:
+{{- if .Values.podSecurityContext }}
+ securityContext:
+{{ toYaml .Values.podSecurityContext | indent 8 }}
+{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: "{{ .Values.priorityClassName }}"
{{- end }}
@@ -52,6 +56,10 @@ spec:
{{- if .Values.extraPorts }}
{{ toYaml .Values.extraPorts | indent 8 }}
{{- end }}
+{{- end }}
+{{- if .Values.securityContext }}
+ securityContext:
+{{ toYaml .Values.securityContext | indent 10 }}
{{- end }}
volumeMounts:
- name: varlog
diff --git a/stable/fluent-bit/values.yaml b/stable/fluent-bit/values.yaml
index a607ed06c5..ff34891247 100644
--- a/stable/fluent-bit/values.yaml
+++ b/stable/fluent-bit/values.yaml
@@ -269,3 +269,15 @@ serviceAccount:
# The name of the ServiceAccount to use.
# If not set and create is true, a name is generated using the fullname template
name:
+
+## Specifies security settings for a container
+## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
+securityContext: {}
+ # securityContext:
+ # privileged: true
+
+## Specifies security settings for a pod
+## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
+podSecurityContext: {}
+ # podSecurityContext:
+ # runAsUser: 1000