Skip to content

Commit

Permalink
fix env name in test script (#2136)
Browse files Browse the repository at this point in the history
  • Loading branch information
sushrk authored Nov 10, 2022
1 parent 4c0856d commit f8bc3b8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/update-cni-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ AWS_K8S_CNI_MANIFEST="$SCRIPTS_DIR/../config/master/aws-k8s-cni.yaml"
MANIFEST_IMG_VERSION=`grep "image:" $AWS_K8S_CNI_MANIFEST | cut -d ":" -f3 | cut -d "\"" -f1 | head -1`

# Replace the images in aws-k8s-cni.yaml with the tester images when environment variables are set
if [[ -z $AWS_K8S_CNI ]]; then
echo "Applying latest CNI image from aws-k8s-cni manifest"
if [[ -z $AMAZON_K8S_CNI ]]; then
echo "Using latest CNI image from aws-k8s-cni manifest"
else
echo "Replacing CNI image in aws-k8s-cni manifest with $AMAZON_K8S_CNI"
sed -i'.bak' "s,602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:$MANIFEST_IMG_VERSION,$AMAZON_K8S_CNI," "$AWS_K8S_CNI_MANIFEST"
fi
if [[ -z $AWS_K8S_CNI_INIT ]]; then
echo "Applying latest CNI init image from aws-k8s-cni manifest"
if [[ -z $AMAZON_K8S_CNI_INIT ]]; then
echo "Using latest CNI init image from aws-k8s-cni manifest"
else
echo "Replacing CNI image in aws-k8s-cni manifest with $AMAZON_K8S_CNI"
echo "Replacing CNI init image in aws-k8s-cni manifest with $AMAZON_K8S_CNI_INIT"
sed -i'.bak' "s,602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni-init:$MANIFEST_IMG_VERSION,$AMAZON_K8S_CNI_INIT," "$AWS_K8S_CNI_MANIFEST"
fi

echo "Applying aws-k8s-cni.yaml manifest to aws-node daemonset"
echo "Applying amazon-vpc-cni-k8s/config/master/aws-k8s-cni.yaml manifest"
kubectl apply -f $AWS_K8S_CNI_MANIFEST

check_ds_rollout "aws-node" "kube-system" "4m"

0 comments on commit f8bc3b8

Please sign in to comment.