Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Remove fsGroup from container level security context #140

Merged
merged 1 commit into from
May 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion filebeat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ helm install --name filebeat elastic/filebeat --version 7.1.0 --set imageTag=7.1
| `imagePullSecrets` | Configuration for [imagePullSecrets](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret) so that you can use a private registry for your image | `[]` |
| `managedServiceAccount` | Whether the `serviceAccount` should be managed by this helm chart. Set this to `false` in order to manage your own service account and related roles. | `true` |
| `podAnnotations` | Configurable [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) applied to all Filebeat pods | `{}` |
| `podSecurityContext` | Configurable [podSecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for Filebeat pod execution environment | `fsGroup: 1000`<br>`runAsUser: 0`<br>`privileged: false` |
| `podSecurityContext` | Configurable [podSecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for Filebeat pod execution environment | `runAsUser: 0`<br>`privileged: false` |
| `livenessProbe` | Parameters to pass to [liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) checks for values such as timeouts and thresholds. | `failureThreshold: 3`<br>`initialDelaySeconds: 10`<br>`periodSeconds: 10`<br>`successThreshold: 3`<br>`timeoutSeconds: 5` |
| `readinessProbe` | Parameters to pass to [readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) checks for values such as timeouts and thresholds. | `failureThreshold: 3`<br>`initialDelaySeconds: 10`<br>`periodSeconds: 10`<br>`successThreshold: 3`<br>`timeoutSeconds: 5` |
| `resources` | Allows you to set the [resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) for the `DaemonSet` | `requests.cpu: 100m`<br>`requests.memory: 100Mi`<br>`limits.cpu: 1000m`<br>`limits.memory: 200Mi` |
Expand Down
2 changes: 0 additions & 2 deletions filebeat/tests/filebeat_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,11 @@ def test_setting_pod_security_context():
config = '''
podSecurityContext:
runAsUser: 1001
fsGroup: 1002
privileged: false
'''
r = helm_template(config)
c = r['daemonset'][name]['spec']['template']['spec']['containers'][0]
assert c['securityContext']['runAsUser'] == 1001
assert c['securityContext']['fsGroup'] == 1002
assert c['securityContext']['privileged'] == False

def test_adding_in_filebeat_config():
Expand Down
2 changes: 0 additions & 2 deletions filebeat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,9 @@ podAnnotations: {}

# Various pod security context settings. Bear in mind that many of these have an impact on Filebeat functioning properly.
#
# - Filesystem group for the Filebeat user. The official elastic docker images always have an id of 1000.
# - User that the container will execute as. Typically necessary to run as root (0) in order to properly collect host container logs.
# - Whether to execute the Filebeat containers as privileged containers. Typically not necessarily unless running within environments such as OpenShift.
podSecurityContext:
fsGroup: 1000
runAsUser: 0
privileged: false

Expand Down
2 changes: 0 additions & 2 deletions kibana/tests/kibana_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,9 @@ def test_setting_pod_security_context():
config = '''
podSecurityContext:
runAsUser: 1001
fsGroup: 1002
'''
r = helm_template(config)
assert r['deployment'][name]['spec']['template']['spec']['securityContext']['runAsUser'] == 1001
assert r['deployment'][name]['spec']['template']['spec']['securityContext']['fsGroup'] == 1002

def test_adding_in_kibana_config():
config = '''
Expand Down
1 change: 0 additions & 1 deletion kibana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ kibanaConfig: {}
# If Pod Security Policy in use it may be required to specify security context as well as service account
podSecurityContext: {}
#runAsUser: "place the user id here"
#fsGroup: "place the group id here"

serviceAccount: ""

Expand Down