Skip to content

Commit ae4e0e0

Browse files
committed
Add readOnlyRootFilesystem=true to containers missing it
readOnlyRootFilesystem prevents containers from writing to the root filesystem, reducing attack surface and improving security posture by limiting potential malicious file modifications and ensuring immutable container runtime. allowPrivilegeEscalation=false prevents containers from gaining additional privileges beyond those initially granted, further hardening the security posture by blocking privilege escalation attacks. Signed-off-by: Federico Paolinelli <[email protected]>
1 parent dc03e01 commit ae4e0e0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

bindata/network/frr-k8s/frr-k8s.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ spec:
4545
emptyDir: {}
4646
- name: frr-status
4747
emptyDir: {}
48+
- name: frr-lib
49+
emptyDir: {}
50+
- name: frr-tmp
51+
emptyDir: {}
4852
- name: metrics-certs
4953
secret:
5054
secretName: frr-k8s-certs-secret
@@ -155,6 +159,8 @@ spec:
155159
mountPath: /etc/frr_reloader
156160
- name: frr
157161
securityContext:
162+
allowPrivilegeEscalation: false
163+
readOnlyRootFilesystem: true
158164
capabilities:
159165
add:
160166
- NET_ADMIN
@@ -170,6 +176,10 @@ spec:
170176
mountPath: /var/run/frr
171177
- name: frr-conf
172178
mountPath: /etc/frr
179+
- name: frr-lib
180+
mountPath: /var/lib/frr
181+
- name: frr-tmp
182+
mountPath: /var/tmp/frr
173183
# The command is FRR's default entrypoint & waiting for the log file to appear and tailing it.
174184
# If the log file isn't created in 60 seconds the tail fails and the container is restarted.
175185
# This workaround is needed to have the frr logs as part of kubectl logs -c frr < controller_pod_name >.

0 commit comments

Comments
 (0)