diff --git a/Makefile b/Makefile index 296f026f..ae977d0f 100644 --- a/Makefile +++ b/Makefile @@ -282,7 +282,7 @@ kind-export-logs: .PHONY: deploy-cert-manager deploy-cert-manager: ## Deploy cert-manager in the configured Kubernetes cluster in ~/.kube/config helm repo add jetstack https://charts.jetstack.io --force-update - helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version ${CERT_MANAGER_VERSION} --set installCRDs=true --set config.apiVersion=controller.config.cert-manager.io/v1alpha1 --set config.kind=ControllerConfiguration --set config.kubernetesAPIQPS=10000 --set config.kubernetesAPIBurst=10000 --kubeconfig=${TEST_KUBECONFIG_LOCATION} + helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version ${CERT_MANAGER_VERSION} --set crds.enabled=true --set config.apiVersion=controller.config.cert-manager.io/v1alpha1 --set config.kind=ControllerConfiguration --set config.kubernetesAPIQPS=10000 --set config.kubernetesAPIBurst=10000 --kubeconfig=${TEST_KUBECONFIG_LOCATION} kubectl wait --for=condition=Available --timeout=300s apiservice v1.cert-manager.io --kubeconfig=${TEST_KUBECONFIG_LOCATION} .PHONY: install-local diff --git a/e2e/blog_test.sh b/e2e/blog_test.sh index acb4ee4b..89938737 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() { @@ -134,14 +135,17 @@ main() { timeout 30s bash -c 'until kubectl get service/nlb-tls-app --output=jsonpath='{.status.loadBalancer}' | grep "ingress"; do : ; 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..d049897c 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