Files
kubernetes/pkg/controller
Jan Safranek 2050d6fc69 selinux: add a new SELinux translator to the controller
A real SELinuxOptionsToFileLabel function needs access to host's
/etc/selinux to read the defaults. This is not possible in
kube-controller-manager that often runs in a container and does not have
access to /etc on the host. Even if it had, it could run on a different
Linux distro than worker nodes.

Therefore implement a custom SELinuxOptionsToFileLabel that does not
default fields in SELinuxOptions and uses just fields provided by the Pod.

Since the controller cannot default empty SELinux label components,
treat them as incomparable.
Example: "system_u:system_r:container_t:s0:c1,c2" *does not* conflict with ":::s0:c1,c2",
because the node that will run such a Pod may expand "":::s0:c1,c2" to "system_u:system_r:container_t:s0:c1,c2".
However, "system_u:system_r:container_t:s0:c1,c2" *does* conflict with ":::s0:c98,c99".
2025-02-17 13:32:10 +01:00
..
2024-12-02 16:59:34 +01:00
2024-12-02 16:59:34 +01:00
2024-12-02 16:59:34 +01:00
2025-01-15 18:14:32 +08:00
2024-12-02 16:59:34 +01:00
2024-12-02 16:59:34 +01:00
2024-12-02 16:59:34 +01:00
2024-12-02 16:59:34 +01:00
2024-12-02 16:59:34 +01:00
2024-12-02 16:59:34 +01:00
2024-12-02 16:59:34 +01:00
2024-12-02 16:59:34 +01:00
2025-01-20 13:01:53 +00:00
2024-09-20 12:36:38 +05:30
2024-12-02 16:59:34 +01:00