-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rudraksh Pareek <[email protected]>
- Loading branch information
1 parent
09fb42d
commit c10756d
Showing
7 changed files
with
80 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
contribution/self-managed-k8s-selinux/crio/install_crio.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2022 Authors of KubeArmor | ||
|
||
. /etc/os-release | ||
|
||
if [ "$ID" != "centos" ]; then | ||
echo "Supports CentOS" | ||
exit | ||
fi | ||
|
||
OS="CentOS_${VERSION_ID}" | ||
VERSION=1.19 | ||
|
||
if [ "$NAME" == "CentOS Stream" ]; then | ||
OS="${OS}_Stream" | ||
fi | ||
|
||
# remove podman | ||
sudo yum remove buildah skopeo podman containers-common atomic-registries docker container-tools | ||
|
||
# remove left-over files | ||
sudo rm -rf /etc/containers/* /var/lib/containers/* /etc/docker /etc/subuid* /etc/subgid* | ||
cd ~ && rm -rf /.local/share/containers/ | ||
|
||
# disable selinux | ||
sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config | ||
|
||
# setup repo | ||
sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/devel:kubic:libcontainers:stable.repo | ||
sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/devel:kubic:libcontainers:stable:cri-o:$VERSION.repo | ||
|
||
sudo yum install cri-o containernetworking-plugins | ||
|
||
sudo systemctl daemon-reload | ||
sudo systemctl start crio.service |
10 changes: 10 additions & 0 deletions
10
contribution/self-managed-k8s-selinux/crio/uninstall_crio.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright 2022 Authors of KubeArmor | ||
|
||
sudo systemctl stop crio.service | ||
|
||
sudo dnf remove cri-o | ||
|
||
sudo rm -rf /etc/crictl.yaml | ||
sudo rm -rf /var/lib/crio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters