diff --git a/e2e/blog_test.sh b/e2e/blog_test.sh index acb4ee4b..f0ddadfa 100644 --- a/e2e/blog_test.sh +++ b/e2e/blog_test.sh @@ -71,6 +71,8 @@ delete_ca() { clean_up() { set +e + echo "Cleaning up test resources" + kubectl delete -f $E2E_DIR/blog-test/test-nlb-tls-app.yaml >/dev/null 2>&1 kubectl delete -f $E2E_DIR/blog-test/nlb-lab-tls.yaml >/dev/null 2>&1 @@ -80,7 +82,6 @@ clean_up() { helm uninstall aws-load-balancer-controller -n kube-system >/dev/null 2>&1 delete_ca - } install_aws_load_balancer() { @@ -132,16 +133,19 @@ main() { echo "nlb-tls-app deployment found." - timeout 30s bash -c 'until kubectl get service/nlb-tls-app --output=jsonpath='{.status.loadBalancer}' | grep "ingress"; do : ; done' 1>/dev/null || exit 1 + timeout 30s bash -c 'until kubectl get service/nlb-tls-app --output=jsonpath='{.status.loadBalancer}' | grep "ingress"; do kubectl get events; done' 1>/dev/null || exit 1 + echo "Creating target groups" + create_target_group + echo "Waiting for target groups" + timeout 600s bash -c 'until echo | openssl s_client -connect $LOAD_BALANCER_HOSTNAME:$PORT; do : ; done' || exit 1 echo "Blog Test Finished Successfully" - - clean_up - } +trap clean_up EXIT + main diff --git a/e2e/kind_config/install_eks.yaml b/e2e/kind_config/install_eks.yaml index 1e1b1aac..5e46ba98 100644 --- a/e2e/kind_config/install_eks.yaml +++ b/e2e/kind_config/install_eks.yaml @@ -107,7 +107,7 @@ spec: serviceAccountName: pod-identity-webhook containers: - name: pod-identity-webhook - image: public.ecr.aws/perplexed/amazon-eks-pod-identity-webhook:latest + image: amazon/amazon-eks-pod-identity-webhook:latest imagePullPolicy: IfNotPresent command: - /webhook @@ -169,7 +169,7 @@ spec: name: selfsigned-issuer kind: ClusterIssuer --- -apiVersion: admissionregistration.k8s.io/v1beta1 +apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: name: pod-identity-webhook @@ -179,6 +179,8 @@ metadata: webhooks: - name: pod-identity-webhook.amazonaws.com failurePolicy: Ignore + sideEffects: None + admissionReviewVersions: ['v1', 'v1beta'] clientConfig: service: name: pod-identity-webhook