Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update install-worker.sh to chmod under more restrictive uname configurations #1717

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions templates/al2/provisioners/install-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ if ! [[ ${ISOLATED_REGIONS} =~ $BINARY_BUCKET_REGION ]]; then
--retry-delay 1 \
-L "https://awscli.amazonaws.com/awscli-exe-linux-${MACHINE}.zip" -o "${AWSCLI_DIR}/awscliv2.zip"
unzip -q "${AWSCLI_DIR}/awscliv2.zip" -d ${AWSCLI_DIR}
sudo "${AWSCLI_DIR}/aws/install" --bin-dir /bin/ --update
sudo sh -c "umask 0002 ; \"${AWSCLI_DIR}/aws/install\" --bin-dir /bin/ --update"
else
echo "Installing awscli package"
sudo yum install -y awscli
Expand Down Expand Up @@ -164,8 +164,8 @@ sudo mv $WORKING_DIR/kubelet-containerd.service /etc/eks/containerd/kubelet-cont
sudo mv $WORKING_DIR/sandbox-image.service /etc/eks/containerd/sandbox-image.service
sudo mv $WORKING_DIR/pull-sandbox-image.sh /etc/eks/containerd/pull-sandbox-image.sh
sudo mv $WORKING_DIR/pull-image.sh /etc/eks/containerd/pull-image.sh
sudo chmod +x /etc/eks/containerd/pull-sandbox-image.sh
sudo chmod +x /etc/eks/containerd/pull-image.sh
sudo chmod 755 /etc/eks/containerd/pull-sandbox-image.sh
sudo chmod 755 /etc/eks/containerd/pull-image.sh
sudo mkdir -p /etc/systemd/system/containerd.service.d
CONFIGURE_CONTAINERD_SLICE=$(vercmp "$KUBERNETES_VERSION" gteq "1.24.0" || true)
if [ "$CONFIGURE_CONTAINERD_SLICE" == "true" ]; then
Expand Down Expand Up @@ -282,7 +282,7 @@ for binary in ${BINARIES[*]}; do
sudo wget $S3_URL_BASE/$binary.sha256
fi
sudo sha256sum -c $binary.sha256
sudo chmod +x $binary
sudo chmod 755 $binary
sudo mv $binary /usr/bin/
done

Expand Down Expand Up @@ -356,12 +356,12 @@ sudo systemctl disable kubelet

sudo mkdir -p /etc/eks
sudo mv $WORKING_DIR/get-ecr-uri.sh /etc/eks/get-ecr-uri.sh
sudo chmod +x /etc/eks/get-ecr-uri.sh
sudo chmod 755 /etc/eks/get-ecr-uri.sh
sudo mv $WORKING_DIR/eni-max-pods.txt /etc/eks/eni-max-pods.txt
sudo mv $WORKING_DIR/bootstrap.sh /etc/eks/bootstrap.sh
sudo chmod +x /etc/eks/bootstrap.sh
sudo chmod 755 /etc/eks/bootstrap.sh
sudo mv $WORKING_DIR/max-pods-calculator.sh /etc/eks/max-pods-calculator.sh
sudo chmod +x /etc/eks/max-pods-calculator.sh
sudo chmod 755 /etc/eks/max-pods-calculator.sh

################################################################################
### ECR CREDENTIAL PROVIDER ####################################################
Expand All @@ -374,7 +374,7 @@ else
echo "AWS cli missing - using wget to fetch ${ECR_CREDENTIAL_PROVIDER_BINARY} from s3. Note: This won't work for private bucket."
sudo wget "$S3_URL_BASE/$ECR_CREDENTIAL_PROVIDER_BINARY"
fi
sudo chmod +x $ECR_CREDENTIAL_PROVIDER_BINARY
sudo chmod 755 $ECR_CREDENTIAL_PROVIDER_BINARY
sudo mkdir -p /etc/eks/image-credential-provider
sudo mv $ECR_CREDENTIAL_PROVIDER_BINARY /etc/eks/image-credential-provider/
sudo mv $WORKING_DIR/ecr-credential-provider-config.json /etc/eks/image-credential-provider/config.json
Expand Down