Skip to content

Commit 0c9ef00

Browse files
barkbaycharith-elastic
authored andcommitted
Fix filebeat securityContext in recipes (#3596) (#3597)
1 parent f565a0f commit 0c9ef00

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

config/recipes/beats/filebeat_autodiscover.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ spec:
3232
terminationGracePeriodSeconds: 30
3333
dnsPolicy: ClusterFirstWithHostNet
3434
hostNetwork: true # Allows to provide richer host metadata
35-
securityContext:
36-
runAsUser: 0
37-
# If using Red Hat OpenShift uncomment this:
38-
#privileged: true
3935
containers:
4036
- name: filebeat
37+
securityContext:
38+
runAsUser: 0
39+
# If using Red Hat OpenShift uncomment this:
40+
#privileged: true
4141
volumeMounts:
4242
- name: varlogcontainers
4343
mountPath: /var/log/containers

config/recipes/beats/filebeat_autodiscover_by_metadata.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ spec:
3434
terminationGracePeriodSeconds: 30
3535
dnsPolicy: ClusterFirstWithHostNet
3636
hostNetwork: true # Allows to provide richer host metadata
37-
securityContext:
38-
runAsUser: 0
39-
# If using Red Hat OpenShift uncomment this:
40-
#privileged: true
4137
containers:
4238
- name: filebeat
39+
securityContext:
40+
runAsUser: 0
41+
# If using Red Hat OpenShift uncomment this:
42+
#privileged: true
4343
volumeMounts:
4444
- name: varlogcontainers
4545
mountPath: /var/log/containers

config/recipes/beats/filebeat_no_autodiscover.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@ spec:
2424
terminationGracePeriodSeconds: 30
2525
dnsPolicy: ClusterFirstWithHostNet
2626
hostNetwork: true # Allows to provide richer host metadata
27-
securityContext:
28-
runAsUser: 0
2927
containers:
3028
- name: filebeat
31-
# If using Red Hat OpenShift uncomment this:
32-
#securityContext:
29+
securityContext:
30+
runAsUser: 0
31+
# If using Red Hat OpenShift uncomment this:
3332
#privileged: true
3433
volumeMounts:
3534
- name: varlogcontainers

0 commit comments

Comments
 (0)