Update setup-kubetools.sh

Fixed to small issues:
1. OS CentOS will report as CentOS not centos
2. K8S Repo file had tabs in it, this resulted in a corrupted Repo file. Remove the leading TABs
This commit is contained in:
pascal71 2021-10-10 21:14:11 +02:00 committed by GitHub
parent 0ebd8220ab
commit 7f38a1df12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,17 +16,17 @@ MYOS=$(hostnamectl | awk '/Operating/ { print $3 }')
OSVERSION=$(hostnamectl | awk '/Operating/ { print $4 }')
##### CentOS 7 config
if [ $MYOS = "centos" ]
if [ $MYOS = "CentOS" ]
then
echo RUNNING CENTOS CONFIG
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF
# Set SELinux in permissive mode (effectively disabling it)