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

INSTALL, conformance-test scripts: apply configuration for aws-k8s-cni v1.6.0 #739

Merged
merged 2 commits into from
Feb 17, 2020
Merged
Show file tree
Hide file tree
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
4 changes: 1 addition & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,7 @@ eksctl utils write-kubeconfig --region us-west-2 --name bottlerocket

Now we can make a configuration change to use a CNI plugin that's compatible with Bottlerocket.
```
kubectl patch daemonset aws-node \
-n kube-system \
-p '{"spec": {"template": {"spec": {"containers": [{"image": "602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:v1.6.0-rc4","name":"aws-node"}]}}}}'
kubectl apply -f https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/release-1.6/config/v1.6/aws-k8s-cni.yaml
```

## Cluster info
Expand Down
12 changes: 5 additions & 7 deletions tools/conformance-test/setup-test-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ for tool in jq aws kubectl eksctl; do
done

DEFAULT_CLUSTER_NAME=sonobuoy-test
CNI_PLUGIN_PATCH='{"spec": {"template": {"spec": {"containers": [{"image": "602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:v1.6.0-rc4","name":"aws-node"}]}}}}'
CNI_PLUGIN_CONFIG=https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/release-1.6/config/v1.6/aws-k8s-cni.yaml

# Helper functions

Expand Down Expand Up @@ -107,7 +107,7 @@ exit_on_error() {
parse_args "${@}"

echo "Setting up fresh EKS cluster with eksctl"
eksctl get cluster -r "${REGION}" -n "${CLUSTER_NAME}" > /dev/null
eksctl get cluster -r "${REGION}" -n "${CLUSTER_NAME}" > /dev/null 2>&1
if [ "${?}" -eq 0 ]; then
echo "* An EKS cluster already exists with name ${CLUSTER_NAME}" >&2
exit 1
Expand All @@ -123,11 +123,9 @@ eksctl utils write-kubeconfig -r "${REGION}" -c "${CLUSTER_NAME}" --kubeconfig "
exit_on_error ${?} "* Failed to write kube config"

KUBECTL="kubectl --kubeconfig ${kubeconfig_file}"
echo "Updating the CNI plugin version"
${KUBECTL} patch daemonset aws-node \
-n kube-system \
-p "${CNI_PLUGIN_PATCH}"
exit_on_error ${?} "* Failed to patch CNI plugin"
echo "Apply configuration for AWS CNI plugin"
${KUBECTL} apply -f "${CNI_PLUGIN_CONFIG}"
exit_on_error ${?} "* Failed to apply configuration for AWS CNI plugin"

echo "Generating userdata file for launching Bottlerocket worker nodes"
endpoint=$(set -o pipefail; \
Expand Down