File tree Expand file tree Collapse file tree
tests/e2e/scenarios/aws-lb-controller Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,13 +21,13 @@ set -o pipefail
2121# Get the cluster name from the KUBECONFIG context
2222CLUSTER_NAME=$( kubectl config view --minify -o jsonpath=' {.clusters[0].name}' )
2323
24- # Get VPC ID by looking at the cluster's subnet
25- VPC=$( kubectl get nodes -o jsonpath=' {.items[0].spec.providerID}' | cut -d' /' -f5 | xargs -I{} aws ec2 describe-instances --instance-ids {} --query ' Reservations[0].Instances[0].VpcId' --output text)
26-
2724# Get the zone from a node
2825ZONE=$( kubectl get nodes -o jsonpath=' {.items[0].metadata.labels.topology\.kubernetes\.io/zone}' )
2926REGION=${ZONE% ?}
3027
28+ # Get VPC ID by looking at the cluster's subnet
29+ VPC=$( kubectl get nodes -o jsonpath=' {.items[0].spec.providerID}' | cut -d' /' -f5 | xargs -I{} aws --region " ${REGION} " ec2 describe-instances --instance-ids {} --query ' Reservations[0].Instances[0].VpcId' --output text)
30+
3131REPORT_DIR=" ${ARTIFACTS:- $(pwd)/ _artifacts} /aws-lb-controller"
3232mkdir -p " ${REPORT_DIR} "
3333
You can’t perform that action at this time.
0 commit comments