mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
add selinux labels for GPU plugins
This commit is contained in:
parent
399c1dd232
commit
22e9d5f882
@ -18,6 +18,8 @@ spec:
|
||||
image: intel/intel-gpu-initcontainer:devel
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
seLinuxOptions:
|
||||
type: "container_device_plugin_init_t"
|
||||
readOnlyRootFilesystem: true
|
||||
allowPrivilegeEscalation: false
|
||||
volumeMounts:
|
||||
@ -33,6 +35,8 @@ spec:
|
||||
image: intel/intel-gpu-plugin:devel
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
seLinuxOptions:
|
||||
type: "container_device_plugin_t"
|
||||
readOnlyRootFilesystem: true
|
||||
allowPrivilegeEscalation: false
|
||||
volumeMounts:
|
||||
|
@ -196,6 +196,9 @@ func setInitContainer(spec *v1.PodSpec, imageName string) {
|
||||
ImagePullPolicy: "IfNotPresent",
|
||||
Name: "intel-gpu-initcontainer",
|
||||
SecurityContext: &v1.SecurityContext{
|
||||
SELinuxOptions: &v1.SELinuxOptions{
|
||||
Type: "container_device_plugin_init_t",
|
||||
},
|
||||
ReadOnlyRootFilesystem: &yes,
|
||||
},
|
||||
VolumeMounts: []v1.VolumeMount{
|
||||
|
@ -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