mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Silence SELinux warning on INSTALL_K3S_SKIP_SELINUX_RPM (#8703)
When k3s is installed with INSTALL_K3S_SKIP_SELINUX_RPM=true or INSTALL_K3S_SKIP_DOWNLOAD=true or INSTALL_K3S_SKIP_DOWNLOAD=selinux, the following message(or similar) is seen on Amazon Linux 2023/Centos ``` [INFO] Skipping installation of SELinux RPM [WARN] Failed to find the k3s-selinux policy, please install: dnf install -y container-selinux dnf install -y https://rpm.rancher.io/k3s/stable/common/centos/8/noarch/ [INFO] Creating /usr/bin/kubectl symlink to k3s ``` whereas now ``` [INFO] Skipping installation of SELinux RPM [INFO] Creating /usr/bin/kubectl symlink to k3s ``` Signed-off-by: Harsimran Singh Maan <maan.harry@gmail.com>
This commit is contained in:
parent
aca1c2fd11
commit
baaab250a7
@ -547,10 +547,11 @@ setup_selinux() {
|
||||
|
||||
if [ "$INSTALL_K3S_SKIP_SELINUX_RPM" = true ] || can_skip_download_selinux || [ ! -d /usr/share/selinux ]; then
|
||||
info "Skipping installation of SELinux RPM"
|
||||
else
|
||||
return
|
||||
fi
|
||||
|
||||
get_k3s_selinux_version
|
||||
install_selinux_rpm ${rpm_site} ${rpm_channel} ${rpm_target} ${rpm_site_infix}
|
||||
fi
|
||||
|
||||
policy_error=fatal
|
||||
if [ "$INSTALL_K3S_SELINUX_WARN" = true ] || [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user