Unverified Commit baaab250 authored by Harsimran Singh Maan's avatar Harsimran Singh Maan Committed by GitHub

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: 's avatarHarsimran Singh Maan <maan.harry@gmail.com>
parent aca1c2fd
...@@ -547,10 +547,11 @@ setup_selinux() { ...@@ -547,10 +547,11 @@ setup_selinux() {
if [ "$INSTALL_K3S_SKIP_SELINUX_RPM" = true ] || can_skip_download_selinux || [ ! -d /usr/share/selinux ]; then if [ "$INSTALL_K3S_SKIP_SELINUX_RPM" = true ] || can_skip_download_selinux || [ ! -d /usr/share/selinux ]; then
info "Skipping installation of SELinux RPM" info "Skipping installation of SELinux RPM"
else return
get_k3s_selinux_version
install_selinux_rpm ${rpm_site} ${rpm_channel} ${rpm_target} ${rpm_site_infix}
fi fi
get_k3s_selinux_version
install_selinux_rpm ${rpm_site} ${rpm_channel} ${rpm_target} ${rpm_site_infix}
policy_error=fatal policy_error=fatal
if [ "$INSTALL_K3S_SELINUX_WARN" = true ] || [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ]; then if [ "$INSTALL_K3S_SELINUX_WARN" = true ] || [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment