Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow SELinuix on RHEL family #241

Merged
merged 1 commit into from
Nov 10, 2023
Merged

Allow SELinuix on RHEL family #241

merged 1 commit into from
Nov 10, 2023

Conversation

dereknola
Copy link
Member

Changes

  • Stop disabling SELinux, we now properly install the correct RPM for each distro

Testing

HA setup of Rocky 8 Nodes
extra_server_args: "--selinux"

See selinux properly applied on all nodes:

[root@server-1 vagrant]# semanage fcontext -l | grep k3s
/etc/systemd/system/k3s.*                          regular file       system_u:object_r:container_unit_file_t:s0 
/usr/lib/systemd/system/k3s.*                      regular file       system_u:object_r:container_unit_file_t:s0 
/usr/local/lib/systemd/system/k3s.*                regular file       system_u:object_r:container_unit_file_t:s0 
/usr/local/s?bin/k3s                               regular file       system_u:object_r:container_runtime_exec_t:s0 
/usr/s?bin/k3s                                     regular file       system_u:object_r:container_runtime_exec_t:s0 
/var/lib/rancher/k3s(/.*)?                         all files          system_u:object_r:container_var_lib_t:s0 
/var/lib/rancher/k3s/agent/containerd/[^/]*/sandboxes(/.*)? all files          system_u:object_r:container_ro_file_t:s0 
/var/lib/rancher/k3s/agent/containerd/[^/]*/snapshots directory          system_u:object_r:container_file_t:s0 
/var/lib/rancher/k3s/agent/containerd/[^/]*/snapshots/[^/]* directory          system_u:object_r:container_file_t:s0 
/var/lib/rancher/k3s/agent/containerd/[^/]*/snapshots/[^/]*/.* all files          <<None>>
/var/lib/rancher/k3s/data(/.*)?                    all files          system_u:object_r:k3s_data_t:s0 
/var/lib/rancher/k3s/data/.lock                    regular file       system_u:object_r:k3s_lock_t:s0 
/var/lib/rancher/k3s/data/[^/]*/bin(/.*)?          all files          system_u:object_r:k3s_root_t:s0 
/var/lib/rancher/k3s/data/[^/]*/bin/[.]links       regular file       system_u:object_r:k3s_data_t:s0 
/var/lib/rancher/k3s/data/[^/]*/bin/[.]sha256sums  regular file       system_u:object_r:k3s_data_t:s0 
/var/lib/rancher/k3s/data/[^/]*/bin/cni            regular file       system_u:object_r:container_runtime_exec_t:s0 
/var/lib/rancher/k3s/data/[^/]*/bin/containerd     regular file       system_u:object_r:container_runtime_exec_t:s0 
/var/lib/rancher/k3s/data/[^/]*/bin/containerd-shim regular file       system_u:object_r:container_runtime_exec_t:s0 
/var/lib/rancher/k3s/data/[^/]*/bin/containerd-shim-runc-v[12] regular file       system_u:object_r:container_runtime_exec_t:s0 
/var/lib/rancher/k3s/data/[^/]*/bin/runc           regular file       system_u:object_r:container_runtime_exec_t:s0 
/var/lib/rancher/k3s/data/[^/]*/etc(/.*)?          all files          system_u:object_r:container_config_t:s0 
/var/lib/rancher/k3s/storage(/.*)?                 all files          system_u:object_r:container_file_t:s0 
/var/run/k3s(/.*)?                                 all files          system_u:object_r:container_var_run_t:s0 
/var/run/k3s/containerd/[^/]*/sandboxes/[^/]*/shm(/.*)? all files          system_u:object_r:container_runtime_tmpfs_t:s0 
[root@server-1 vagrant]# kubectl get nodes
NAME       STATUS   ROLES                       AGE   VERSION
agent-0    Ready    <none>                      63s   v1.26.9+k3s1
server-0   Ready    control-plane,etcd,master   68s   v1.26.9+k3s1
server-1   Ready    control-plane,etcd,master   35s   v1.26.9+k3s1
server-2   Ready    control-plane,etcd,master   50s   v1.26.9+k3s1

Linked Issues

#240

@dereknola dereknola merged commit fd4e8bf into master Nov 10, 2023
2 checks passed
@dereknola dereknola deleted the rhel_selinux branch November 10, 2023 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant