Este contenido no está disponible en el idioma seleccionado.
Chapter 6. Additional security privileges granted for kubevirt-controller and virt-launcher
The
kubevirt-controller
6.1. Extended SELinux policies for virt-launcher pods Copiar enlaceEnlace copiado en el portapapeles!
The
container_t
-
allow process self (tun_socket (relabelfrom relabelto attach_queue)) -
allow process sysfs_t (file (write)) -
allow process hugetlbfs_t (dir (add_name create write remove_name rmdir setattr)) -
allow process hugetlbfs_t (file (create unlink))
These rules enable the following virtualization features:
- Relabel and attach queues to its own TUN sockets, which is required to support network multi-queue. Multi-queue enables network performance to scale as the number of available vCPUs increases.
-
Allows virt-launcher pods to write information to sysfs () files, which is required to enable Single Root I/O Virtualization (SR-IOV).
/sys -
Read/write entries, which is required to support huge pages. Huge pages are a method of managing large amounts of memory by increasing the memory page size.
hugetlbfs
6.2. Additional OpenShift Container Platform security context constraints and Linux capabilities for the kubevirt-controller service account Copiar enlaceEnlace copiado en el portapapeles!
Security context constraints (SCCs) control permissions for pods. These permissions include actions that a pod, a collection of containers, can perform and what resources it can access. You can use SCCs to define a set of conditions that a pod must run with to be accepted into the system.
The
kubevirt-controller
kubevirt-controller
6.2.1. Additional SCCs granted to the kubevirt-controller service account Copiar enlaceEnlace copiado en el portapapeles!
The
kubevirt-controller
The
kubevirt-controller
-
scc.AllowHostDirVolumePlugin = true
This allows virtual machines to use the hostpath volume plugin. -
scc.AllowPrivilegedContainer = false
This ensures the virt-launcher pod is not run as a privileged container. -
scc.AllowedCapabilities = []corev1.Capability{"NET_ADMIN", "NET_RAW", "SYS_NICE"}
This provides the following additional Linux capabilities,NET_ADMIN, andNET_RAW.SYS_NICE
6.2.2. Viewing the SCC and RBAC definitions for the kubevirt-controller Copiar enlaceEnlace copiado en el portapapeles!
You can view the
SecurityContextConstraints
kubevirt-controller
oc
$ oc get scc kubevirt-controller -o yaml
You can view the RBAC definition for the
kubevirt-controller
oc
$ oc get clusterrole kubevirt-controller -o yaml