Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depl: drop capabilities from all plugins #1945

Merged
merged 1 commit into from
Jan 10, 2025
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
7 changes: 6 additions & 1 deletion deployments/dlb_plugin/base/intel-dlb-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ spec:
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
terminationMessagePath: /tmp/termination-log
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
terminationMessagePath: /tmp/termination-log
resources:
requests:
memory: "15Mi"
Expand Down
5 changes: 5 additions & 0 deletions deployments/dsa_plugin/base/intel-dsa-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ spec:
type: "container_device_plugin_t"
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
resources:
requests:
memory: "25Mi"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,15 @@ spec:
- -mode=af
terminationMessagePath: /tmp/termination-log
securityContext:
seLinuxOptions:
type: "container_device_plugin_t"
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
resources:
requests:
memory: "30Mi"
Expand Down
5 changes: 5 additions & 0 deletions deployments/gpu_plugin/base/intel-gpu-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ spec:
type: "container_device_plugin_t"
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
resources:
requests:
memory: "45Mi"
Expand Down
7 changes: 7 additions & 0 deletions deployments/gpu_plugin/overlays/levelzero/levelzero.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
imagePullPolicy: IfNotPresent
args:
- "-v=2"
resources:
requests:
cpu: 25m
memory: 50Mi
limits:
cpu: 50m
memory: 100Mi
securityContext:
readOnlyRootFilesystem: true
privileged: true
Expand Down
5 changes: 5 additions & 0 deletions deployments/iaa_plugin/base/intel-iaa-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ spec:
type: "container_device_plugin_t"
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
resources:
requests:
memory: "25Mi"
Expand Down
5 changes: 5 additions & 0 deletions deployments/qat_plugin/base/intel-qat-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ spec:
type: "container_device_plugin_t"
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
imagePullPolicy: IfNotPresent
resources:
requests:
Expand Down
5 changes: 5 additions & 0 deletions deployments/sgx_plugin/base/intel-sgx-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ spec:
type: "container_device_plugin_t"
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
imagePullPolicy: IfNotPresent
resources:
requests:
Expand Down
2 changes: 2 additions & 0 deletions pkg/controllers/dlb/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
SecurityContext: &v1.SecurityContext{
ReadOnlyRootFilesystem: &yes,
AllowPrivilegeEscalation: &no,
Capabilities: &v1.Capabilities{Drop: []v1.Capability{"ALL"}},
SeccompProfile: &v1.SeccompProfile{Type: v1.SeccompProfileTypeRuntimeDefault},
},
Resources: v1.ResourceRequirements{
Limits: v1.ResourceList{
Expand Down
2 changes: 2 additions & 0 deletions pkg/controllers/dsa/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
},
ReadOnlyRootFilesystem: &yes,
AllowPrivilegeEscalation: &no,
Capabilities: &v1.Capabilities{Drop: []v1.Capability{"ALL"}},
SeccompProfile: &v1.SeccompProfile{Type: v1.SeccompProfileTypeRuntimeDefault},
},
Resources: v1.ResourceRequirements{
Limits: v1.ResourceList{
Expand Down
5 changes: 5 additions & 0 deletions pkg/controllers/fpga/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,13 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
ImagePullPolicy: "IfNotPresent",
Name: appLabel,
SecurityContext: &v1.SecurityContext{
SELinuxOptions: &v1.SELinuxOptions{
Type: "container_device_plugin_t",
},
ReadOnlyRootFilesystem: &yes,
AllowPrivilegeEscalation: &no,
Capabilities: &v1.Capabilities{Drop: []v1.Capability{"ALL"}},
SeccompProfile: &v1.SeccompProfile{Type: v1.SeccompProfileTypeRuntimeDefault},
},
TerminationMessagePath: "/tmp/termination-log",
Resources: v1.ResourceRequirements{
Expand Down
2 changes: 2 additions & 0 deletions pkg/controllers/gpu/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
},
ReadOnlyRootFilesystem: &yes,
AllowPrivilegeEscalation: &no,
Capabilities: &v1.Capabilities{Drop: []v1.Capability{"ALL"}},
SeccompProfile: &v1.SeccompProfile{Type: v1.SeccompProfileTypeRuntimeDefault},
},
Resources: v1.ResourceRequirements{
Limits: v1.ResourceList{
Expand Down
2 changes: 2 additions & 0 deletions pkg/controllers/iaa/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
},
ReadOnlyRootFilesystem: &yes,
AllowPrivilegeEscalation: &no,
Capabilities: &v1.Capabilities{Drop: []v1.Capability{"ALL"}},
SeccompProfile: &v1.SeccompProfile{Type: v1.SeccompProfileTypeRuntimeDefault},
},
Resources: v1.ResourceRequirements{
Limits: v1.ResourceList{
Expand Down
2 changes: 2 additions & 0 deletions pkg/controllers/qat/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
},
ReadOnlyRootFilesystem: &yes,
AllowPrivilegeEscalation: &no,
Capabilities: &v1.Capabilities{Drop: []v1.Capability{"ALL"}},
SeccompProfile: &v1.SeccompProfile{Type: v1.SeccompProfileTypeRuntimeDefault},
},
Resources: v1.ResourceRequirements{
Limits: v1.ResourceList{
Expand Down
2 changes: 2 additions & 0 deletions pkg/controllers/sgx/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
},
ReadOnlyRootFilesystem: &yes,
AllowPrivilegeEscalation: &no,
Capabilities: &v1.Capabilities{Drop: []v1.Capability{"ALL"}},
SeccompProfile: &v1.SeccompProfile{Type: v1.SeccompProfileTypeRuntimeDefault},
},
Resources: v1.ResourceRequirements{
Limits: v1.ResourceList{
Expand Down
Loading