Skip to content

Commit 6dabf70

Browse files
authored
chore: update cilium-operator security context (#2755)
* update cil-operator security context * add security context to 1.14 template
1 parent 91d1e76 commit 6dabf70

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

test/integration/manifests/cilium/v1.13/cilium-operator/templates/deployment.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,44 @@ spec:
6060
containerPort: 9963
6161
hostPort: 9963
6262
protocol: TCP
63+
securityContext:
64+
seLinuxOptions:
65+
level: 's0'
66+
# Running with spc_t since we have removed the privileged mode.
67+
# Users can change it to a different type as long as they have the
68+
# type available on the system.
69+
type: 'spc_t'
70+
capabilities:
71+
add:
72+
# Use to set socket permission
73+
- CHOWN
74+
# Used to terminate envoy child process
75+
- KILL
76+
# Used since cilium modifies routing tables, etc...
77+
- NET_ADMIN
78+
# Used since cilium creates raw sockets, etc...
79+
- NET_RAW
80+
# Used since cilium monitor uses mmap
81+
- IPC_LOCK
82+
# Used in iptables. Consider removing once we are iptables-free
83+
- SYS_MODULE
84+
# We need it for now but might not need it for >= 5.11 specially
85+
# for the 'SYS_RESOURCE'.
86+
# In >= 5.8 there's already BPF and PERMON capabilities
87+
- SYS_ADMIN
88+
# Could be an alternative for the SYS_ADMIN for the RLIMIT_NPROC
89+
- SYS_RESOURCE
90+
# Both PERFMON and BPF requires kernel 5.8, container runtime
91+
# cri-o >= v1.22.0 or containerd >= v1.5.0.
92+
# If available, SYS_ADMIN can be removed.
93+
#- PERFMON
94+
#- BPF
95+
- DAC_OVERRIDE
96+
- FOWNER
97+
- SETGID
98+
- SETUID
99+
drop:
100+
- ALL
63101
livenessProbe:
64102
httpGet:
65103
host: "127.0.0.1"

test/integration/manifests/cilium/v1.14/cilium-operator/templates/deployment.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,44 @@ spec:
6060
containerPort: 9963
6161
hostPort: 9963
6262
protocol: TCP
63+
securityContext:
64+
seLinuxOptions:
65+
level: 's0'
66+
# Running with spc_t since we have removed the privileged mode.
67+
# Users can change it to a different type as long as they have the
68+
# type available on the system.
69+
type: 'spc_t'
70+
capabilities:
71+
add:
72+
# Use to set socket permission
73+
- CHOWN
74+
# Used to terminate envoy child process
75+
- KILL
76+
# Used since cilium modifies routing tables, etc...
77+
- NET_ADMIN
78+
# Used since cilium creates raw sockets, etc...
79+
- NET_RAW
80+
# Used since cilium monitor uses mmap
81+
- IPC_LOCK
82+
# Used in iptables. Consider removing once we are iptables-free
83+
- SYS_MODULE
84+
# We need it for now but might not need it for >= 5.11 specially
85+
# for the 'SYS_RESOURCE'.
86+
# In >= 5.8 there's already BPF and PERMON capabilities
87+
- SYS_ADMIN
88+
# Could be an alternative for the SYS_ADMIN for the RLIMIT_NPROC
89+
- SYS_RESOURCE
90+
# Both PERFMON and BPF requires kernel 5.8, container runtime
91+
# cri-o >= v1.22.0 or containerd >= v1.5.0.
92+
# If available, SYS_ADMIN can be removed.
93+
#- PERFMON
94+
#- BPF
95+
- DAC_OVERRIDE
96+
- FOWNER
97+
- SETGID
98+
- SETUID
99+
drop:
100+
- ALL
63101
livenessProbe:
64102
httpGet:
65103
host: "127.0.0.1"

0 commit comments

Comments
 (0)