From f21cc04639e4e2466692276dde96c5a7b3686ca6 Mon Sep 17 00:00:00 2001 From: Maksim Fedotov Date: Fri, 28 Nov 2025 15:23:04 +0300 Subject: [PATCH] chore(ci): remove selinux packages Signed-off-by: Maksim Fedotov --- templates/nodegroupconfiguration-selinux.yaml | 75 ------------------- 1 file changed, 75 deletions(-) delete mode 100644 templates/nodegroupconfiguration-selinux.yaml diff --git a/templates/nodegroupconfiguration-selinux.yaml b/templates/nodegroupconfiguration-selinux.yaml deleted file mode 100644 index 1a81b02797..0000000000 --- a/templates/nodegroupconfiguration-selinux.yaml +++ /dev/null @@ -1,75 +0,0 @@ -apiVersion: deckhouse.io/v1alpha1 -kind: NodeGroupConfiguration -metadata: - name: virtualization-selinux-packages - {{- include "helm_lib_module_labels" (list .) | nindent 2 }} -spec: - bundles: - - 'redos' - - 'centos' - weight: 30 - nodeGroups: - - '*' - content: | - # Copyright 2024 Flant JSC - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - - # Check if SELinux is enabled - function is_selinux_enabled() { - selinux_status=$(getenforce 2>/dev/null) - if [[ "$selinux_status" == "Enforcing" || "$selinux_status" == "Permissive" ]]; then - return 0 - else - return 1 - fi - } - - # Check if a package is installed - function is_package_installed() { - if rpm -q "$1" &>/dev/null; then - return 0 - else - return 1 - fi - } - - # Install a package - function install_package() { - bb-dnf-install "$1" - } - - if is_selinux_enabled; then - - if is_package_installed "selinux-policy"; then - - if is_package_installed "container-selinux"; then - exit 0 - fi - - bb-log-info "install container-selinux" - install_package "container-selinux" - else - bb-event-on 'bb-package-installed' 'post-install' - post-install() { - bb-log-info "Setting reboot flag due to selinux-policy was installed" - bb-flag-set reboot - } - bb-deckhouse-get-disruptive-update-approval - install_package "selinux-policy" - install_package "container-selinux" - fi - - else - exit 0 - fi