Skip to content
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: 2 additions & 0 deletions deployments/dsa_plugin/base/intel-dsa-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ spec:
image: intel/intel-dsa-plugin:devel
imagePullPolicy: IfNotPresent
securityContext:
seLinuxOptions:
type: "container_device_plugin_t"
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
volumeMounts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ spec:
fieldPath: spec.nodeName
image: intel/intel-idxd-config-initcontainer:devel
securityContext:
seLinuxOptions:
type: "container_device_plugin_init_t"
readOnlyRootFilesystem: true
privileged: true
volumeMounts:
Expand Down
2 changes: 2 additions & 0 deletions deployments/iaa_plugin/base/intel-iaa-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ spec:
image: intel/intel-iaa-plugin:devel
imagePullPolicy: IfNotPresent
securityContext:
seLinuxOptions:
type: "container_device_plugin_t"
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
volumeMounts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ spec:
value: "iaa"
image: intel/intel-idxd-config-initcontainer:devel
securityContext:
seLinuxOptions:
type: "container_device_plugin_init_t"
readOnlyRootFilesystem: true
privileged: true
volumeMounts:
Expand Down
3 changes: 3 additions & 0 deletions pkg/controllers/dsa/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ func addInitContainer(ds *apps.DaemonSet, dp *devicepluginv1.DsaDevicePlugin) {
},
},
SecurityContext: &v1.SecurityContext{
SELinuxOptions: &v1.SELinuxOptions{
Type: "container_device_plugin_init_t",
},
ReadOnlyRootFilesystem: &yes,
Privileged: &yes,
},
Expand Down
3 changes: 3 additions & 0 deletions pkg/controllers/dsa/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
Image: devicePlugin.Spec.Image,
ImagePullPolicy: "IfNotPresent",
SecurityContext: &v1.SecurityContext{
SELinuxOptions: &v1.SELinuxOptions{
Type: "container_device_plugin_t",
},
ReadOnlyRootFilesystem: &yes,
AllowPrivilegeEscalation: &no,
},
Expand Down
3 changes: 3 additions & 0 deletions pkg/controllers/iaa/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ func addInitContainer(ds *apps.DaemonSet, dp *devicepluginv1.IaaDevicePlugin) {
},
},
SecurityContext: &v1.SecurityContext{
SELinuxOptions: &v1.SELinuxOptions{
Type: "container_device_plugin_init_t",
},
ReadOnlyRootFilesystem: &yes,
Privileged: &yes,
},
Expand Down
3 changes: 3 additions & 0 deletions pkg/controllers/iaa/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
Image: devicePlugin.Spec.Image,
ImagePullPolicy: "IfNotPresent",
SecurityContext: &v1.SecurityContext{
SELinuxOptions: &v1.SELinuxOptions{
Type: "container_device_plugin_t",
},
ReadOnlyRootFilesystem: &yes,
AllowPrivilegeEscalation: &no,
},
Expand Down