From 80b248ec76875ab9769850a433bcacb293ea0fe9 Mon Sep 17 00:00:00 2001 From: Elijah Quinones Date: Mon, 24 Nov 2025 19:10:50 +0000 Subject: [PATCH] Fix a1 e2e tests --- Makefile | 4 ++-- hack/e2e/build-image.sh | 2 +- hack/e2e/create-cluster.sh | 3 ++- hack/e2e/kops/kops.sh | 6 +++++- hack/e2e/kops/patch-cluster.yaml | 14 ++++++++++++++ hack/prow-e2e.sh | 12 ++++++------ 6 files changed, 30 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 7316eb626b..236cfed7d6 100644 --- a/Makefile +++ b/Makefile @@ -159,8 +159,8 @@ e2e/external: bin/helm bin/kubetest2 COLLECT_METRICS="true" \ ./hack/e2e/run.sh -.PHONY: e2e/external-a1-eks -e2e/external-a1-eks: bin/helm bin/kubetest2 +.PHONY: e2e/external-a1 +e2e/external-a1: bin/helm bin/kubetest2 HELM_EXTRA_FLAGS="--set=a1CompatibilityDaemonSet=true" \ ./hack/e2e/run.sh diff --git a/hack/e2e/build-image.sh b/hack/e2e/build-image.sh index 649bec7d5e..7bb57c4a75 100755 --- a/hack/e2e/build-image.sh +++ b/hack/e2e/build-image.sh @@ -70,7 +70,7 @@ function build_and_push() { PUSH_TYPE="sub-push" - if [[ "$INSTANCE_TYPE" == "a1.large" ]]; then + if [[ "$INSTANCE_TYPE" == "a1.xlarge" ]]; then # In the case of a1compat image we need both controller image and a1 compat node image PUSH_TYPE="sub-push sub-push-a1compat" fi diff --git a/hack/e2e/create-cluster.sh b/hack/e2e/create-cluster.sh index 5f59b879e6..71f50483ea 100755 --- a/hack/e2e/create-cluster.sh +++ b/hack/e2e/create-cluster.sh @@ -59,7 +59,8 @@ if [[ "${CLUSTER_TYPE}" == "kops" ]]; then "$KUBECONFIG" \ "${BASE_DIR}/kops/patch-cluster.yaml" \ "${BASE_DIR}/kops/patch-node.yaml" \ - "s3://${KOPS_BUCKET}" + "s3://${KOPS_BUCKET}" \ + "${BIN}/gomplate" elif [[ "${CLUSTER_TYPE}" == "eksctl" ]]; then eksctl_create_cluster \ "$CLUSTER_NAME" \ diff --git a/hack/e2e/kops/kops.sh b/hack/e2e/kops/kops.sh index db529454f3..69d48fd4c1 100644 --- a/hack/e2e/kops/kops.sh +++ b/hack/e2e/kops/kops.sh @@ -32,6 +32,7 @@ function kops_create_cluster() { KOPS_PATCH_FILE=${10} KOPS_PATCH_NODE_FILE=${11} KOPS_STATE_FILE=${12} + GOMPLATE_BIN=${13} declare -x KOPS_TOO_NEW_VERSION=true if kops_cluster_exists "${CLUSTER_NAME}" "${KOPS_BIN}" "${KOPS_STATE_FILE}"; then @@ -50,7 +51,10 @@ function kops_create_cluster() { "${CLUSTER_NAME}" >"${CLUSTER_FILE}" if test -f "$KOPS_PATCH_FILE"; then - kops_patch_cluster_file "$CLUSTER_FILE" "$KOPS_PATCH_FILE" "Cluster" "" + loudecho "Templating $KOPS_PATCH_FILE to $KOPS_PATCH_FILE.processed" + INSTANCE_TYPE="$INSTANCE_TYPE" \ + ${GOMPLATE_BIN} -f "$KOPS_PATCH_FILE" -o "$KOPS_PATCH_FILE.processed" + kops_patch_cluster_file "$CLUSTER_FILE" "$KOPS_PATCH_FILE.processed" "Cluster" "" fi if test -f "$KOPS_PATCH_NODE_FILE"; then kops_patch_cluster_file "$CLUSTER_FILE" "$KOPS_PATCH_NODE_FILE" "InstanceGroup" "Node" diff --git a/hack/e2e/kops/patch-cluster.yaml b/hack/e2e/kops/patch-cluster.yaml index 9557cdbc90..b734e49e0d 100644 --- a/hack/e2e/kops/patch-cluster.yaml +++ b/hack/e2e/kops/patch-cluster.yaml @@ -24,6 +24,20 @@ spec: kubeScheduler: featureGates: VolumeAttributesClass: "true" +{{- if hasPrefix "a1." (env.Getenv "INSTANCE_TYPE") }} + containerd: + version: "1.7.28" + runc: + version: "1.3.0" + networking: + cilium: null + flannel: + backend: vxlan + podCIDR: 100.96.0.0/11 + serviceClusterIPRange: 100.64.0.0/13 + kubeProxy: + enabled: true +{{- end }} additionalPolicies: node: | [ diff --git a/hack/prow-e2e.sh b/hack/prow-e2e.sh index 123b13c30c..11c3614f97 100755 --- a/hack/prow-e2e.sh +++ b/hack/prow-e2e.sh @@ -49,13 +49,13 @@ test-e2e-external-eks) TEST="external" export CLUSTER_TYPE="eksctl" ;; -test-e2e-external-a1-eks) - TEST="external-a1-eks" - export K8S_VERSION_EKSCTL="1.30" - export INSTANCE_TYPE="a1.large" +test-e2e-external-a1) + TEST="external-a1" + export AWS_AVAILABILITY_ZONES="us-west-2b,us-west-2c" + export INSTANCE_TYPE="a1.xlarge" export IMAGE_ARCH="arm64" - export CLUSTER_TYPE="eksctl" - export AMI_FAMILY="AmazonLinux2" + export AMI_PARAMETER="/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2" + export CLUSTER_TYPE="kops" ;; test-e2e-external-eks-bottlerocket) TEST="external-eks-bottlerocket"