Open alknopfler opened 7 months ago
Can’t this be achieved by specifying preRKE2Commands
and postRKE2Commands
via ignition config? A dedicated field for this means that underlying functionality will have to be implemented for other underlying systems, not only slemicro.
I think that these lines has to be excluded from hard-coded configuration and passed conditionally via preRKE2Commands
and postRKE2Commands
. Alternatively we can think about bootstrap extension mechanism, allowing to modify all default commands based on some label selector matching a resource with commands included in the spec (a ConfigMap?).
The reason to include into the hardcoded Block is because with pre and post it was not working fine (already tested).
Let me test it again now that we've got more context.
Dropping priority as there's no immediate need right now. Might revisit later.
@alknopfler Can we close this issue for now?
Describe the solution you'd like: create a flag, knob or any other implementation to be able to disable the selinux lines to be applied on the rke2 (using ignition) if we're disabling from kernel args selinux.
Why do you want this feature: The current implementation assumes that by default on ignition and slemicro selinux is enabled by default. But in some cases, for a performance issue on the Telco environments (running low latency apps) selinux has to be disabled on the kernel-args but the implementation to deploy a rke2 cluster is assuming is enable to modify the labels of rke2-server.service file: https://github.com/rancher-sandbox/cluster-api-provider-rke2/blob/77622c991b9cc830a36ee516c0a175eab67c3623/bootstrap/internal/ignition/ignition.go#L35-L51
Anything else you would like to add: Attached the journalctl logs when you've got selinux disabled in kernel args: