mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
Merge pull request #1479 from mregmi/main
Add SELinux Labels for DSA and IAA
This commit is contained in:
commit
432741e5e0
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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,
|
||||
},
|
||||
|
@ -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,
|
||||
},
|
||||
|
@ -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,
|
||||
},
|
||||
|
@ -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,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user