From b142b18a50cdc994d032ef887beaca9ca145a869 Mon Sep 17 00:00:00 2001 From: Joel Smith Date: Wed, 26 Aug 2026 15:07:58 -0600 Subject: [PATCH 1/2] Add TEST_PLAN support to hypershift-aws-e2e-v2 workflow Add a hypershift-write-test-plan "hook" step that writes inline test plan content from the TEST_PLAN env var to SHARED_DIR for consumption by create-guests and run-tests via the TEST_PLAN env var introduced in openshift/hypershift#9420. If TEST_PLAN is unset, the default tests are run. --- .../hypershift-aws-create-guests-commands.sh | 4 ++++ .../hypershift-aws-e2e-v2-workflow.yaml | 1 + .../hypershift-aws-run-e2e-v2-chain.yaml | 3 +++ .../hypershift/write-test-plan/OWNERS | 13 +++++++++++++ .../hypershift-write-test-plan-commands.sh | 9 +++++++++ ...pershift-write-test-plan-ref.metadata.json | 19 +++++++++++++++++++ .../hypershift-write-test-plan-ref.yaml | 13 +++++++++++++ 7 files changed, 62 insertions(+) create mode 100644 ci-operator/step-registry/hypershift/write-test-plan/OWNERS create mode 100644 ci-operator/step-registry/hypershift/write-test-plan/hypershift-write-test-plan-commands.sh create mode 100644 ci-operator/step-registry/hypershift/write-test-plan/hypershift-write-test-plan-ref.metadata.json create mode 100644 ci-operator/step-registry/hypershift/write-test-plan/hypershift-write-test-plan-ref.yaml diff --git a/ci-operator/step-registry/hypershift/aws/create-guests/hypershift-aws-create-guests-commands.sh b/ci-operator/step-registry/hypershift/aws/create-guests/hypershift-aws-create-guests-commands.sh index d8c2ebbb104d0..d3f50dd04d157 100644 --- a/ci-operator/step-registry/hypershift/aws/create-guests/hypershift-aws-create-guests-commands.sh +++ b/ci-operator/step-registry/hypershift/aws/create-guests/hypershift-aws-create-guests-commands.sh @@ -10,4 +10,8 @@ if [[ -f "${SHARED_DIR}/nodepool_release_images" ]]; then source "${SHARED_DIR}/nodepool_release_images" fi +if [[ -f "${SHARED_DIR}/test-plan.yaml" ]]; then + export TEST_PLAN="${SHARED_DIR}/test-plan.yaml" +fi + /hypershift/bin/create-guests diff --git a/ci-operator/step-registry/hypershift/aws/e2e-v2/hypershift-aws-e2e-v2-workflow.yaml b/ci-operator/step-registry/hypershift/aws/e2e-v2/hypershift-aws-e2e-v2-workflow.yaml index c0459b43c5851..4ae233c0798ed 100644 --- a/ci-operator/step-registry/hypershift/aws/e2e-v2/hypershift-aws-e2e-v2-workflow.yaml +++ b/ci-operator/step-registry/hypershift/aws/e2e-v2/hypershift-aws-e2e-v2-workflow.yaml @@ -23,6 +23,7 @@ workflow: - chain: hypershift-setup-nested-management-cluster - ref: hypershift-install - ref: hypershift-resolve-nodepool-releases + - ref: hypershift-write-test-plan - chain: hypershift-aws-create-guests test: - chain: hypershift-aws-run-e2e-v2 diff --git a/ci-operator/step-registry/hypershift/aws/run-e2e-v2/hypershift-aws-run-e2e-v2-chain.yaml b/ci-operator/step-registry/hypershift/aws/run-e2e-v2/hypershift-aws-run-e2e-v2-chain.yaml index ac3f2c058c690..abe3e75ba4e70 100644 --- a/ci-operator/step-registry/hypershift/aws/run-e2e-v2/hypershift-aws-run-e2e-v2-chain.yaml +++ b/ci-operator/step-registry/hypershift/aws/run-e2e-v2/hypershift-aws-run-e2e-v2-chain.yaml @@ -13,6 +13,9 @@ chain: export AWS_SHARED_CREDENTIALS_FILE="/etc/hypershift-ci-jobs-awscreds/credentials" export AWS_GUEST_INFRA_CREDENTIALS_FILE="/etc/hypershift-ci-jobs-awscreds/credentials" export PULL_SECRET_FILE="/etc/ci-pull-credentials/.dockerconfigjson" + if [[ -f "${SHARED_DIR}/test-plan.yaml" ]]; then + export TEST_PLAN="${SHARED_DIR}/test-plan.yaml" + fi /hypershift/bin/run-tests timeout: 150m grace_period: 5m diff --git a/ci-operator/step-registry/hypershift/write-test-plan/OWNERS b/ci-operator/step-registry/hypershift/write-test-plan/OWNERS new file mode 100644 index 0000000000000..7e0aad26c2a74 --- /dev/null +++ b/ci-operator/step-registry/hypershift/write-test-plan/OWNERS @@ -0,0 +1,13 @@ +approvers: +- csrwng +- enxebre +- mgencur +- bryan-cox +- jparrill +options: {} +reviewers: +- csrwng +- enxebre +- mgencur +- bryan-cox +- jparrill diff --git a/ci-operator/step-registry/hypershift/write-test-plan/hypershift-write-test-plan-commands.sh b/ci-operator/step-registry/hypershift/write-test-plan/hypershift-write-test-plan-commands.sh new file mode 100644 index 0000000000000..6ba1702786abd --- /dev/null +++ b/ci-operator/step-registry/hypershift/write-test-plan/hypershift-write-test-plan-commands.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -euo pipefail + +if [[ -n "${TEST_PLAN:-}" ]]; then + # Always write as .yaml since all JSON is valid YAML, and the YAML parser handles both. + echo "${TEST_PLAN}" > "${SHARED_DIR}/test-plan.yaml" + echo "Wrote test plan to ${SHARED_DIR}/test-plan.yaml" +fi diff --git a/ci-operator/step-registry/hypershift/write-test-plan/hypershift-write-test-plan-ref.metadata.json b/ci-operator/step-registry/hypershift/write-test-plan/hypershift-write-test-plan-ref.metadata.json new file mode 100644 index 0000000000000..84068ba56d530 --- /dev/null +++ b/ci-operator/step-registry/hypershift/write-test-plan/hypershift-write-test-plan-ref.metadata.json @@ -0,0 +1,19 @@ +{ + "path": "hypershift/write-test-plan/hypershift-write-test-plan-ref.yaml", + "owners": { + "approvers": [ + "csrwng", + "enxebre", + "mgencur", + "bryan-cox", + "jparrill" + ], + "reviewers": [ + "csrwng", + "enxebre", + "mgencur", + "bryan-cox", + "jparrill" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/hypershift/write-test-plan/hypershift-write-test-plan-ref.yaml b/ci-operator/step-registry/hypershift/write-test-plan/hypershift-write-test-plan-ref.yaml new file mode 100644 index 0000000000000..9bb33137ec3b9 --- /dev/null +++ b/ci-operator/step-registry/hypershift/write-test-plan/hypershift-write-test-plan-ref.yaml @@ -0,0 +1,13 @@ +# Note: This step is meant as an optional "hook" into the test lifecycle and default plans will be used if TEST_PLAN is empty or unset +ref: + as: hypershift-write-test-plan + from: cli + commands: hypershift-write-test-plan-commands.sh + env: + - name: TEST_PLAN + default: "" + documentation: "Inline test plan content (JSON or YAML). If set, written to SHARED_DIR/test-plan.yaml for consumption by create-guests and run-tests. If unset, the default test plan is used." + resources: + requests: + cpu: 100m + memory: 100Mi From 13f96358a63143c267861d91829adf401e8b2a12 Mon Sep 17 00:00:00 2001 From: Joel Smith Date: Tue, 1 Sep 2026 11:00:21 -0600 Subject: [PATCH 2/2] Add e2e-aws-autonode-standalone-ko presubmit job Add an optional presubmit that runs AutoNode/Karpenter e2e tests with the standalone karpenter-operator enabled. The new job uses a TEST_PLAN to run only the karpenter test variant. Also add the var ENABLE_STANDALONE_KARPENTER_OPERATOR to the install step. --- .../hypershift/openshift-hypershift-main.yaml | 19 ++++ .../openshift-hypershift-main-presubmits.yaml | 88 +++++++++++++++++++ .../install/hypershift-install-commands.sh | 4 + .../install/hypershift-install-ref.yaml | 3 + 4 files changed, 114 insertions(+) diff --git a/ci-operator/config/openshift/hypershift/openshift-hypershift-main.yaml b/ci-operator/config/openshift/hypershift/openshift-hypershift-main.yaml index c3a897b2bbd79..0717b877b0a88 100644 --- a/ci-operator/config/openshift/hypershift/openshift-hypershift-main.yaml +++ b/ci-operator/config/openshift/hypershift/openshift-hypershift-main.yaml @@ -711,6 +711,25 @@ tests: ENABLE_HYPERSHIFT_CERT_ROTATION_SCALE: "true" REQUEST_SERVING_COMPONENT_TEST: "true" workflow: hypershift-aws-e2e-nested +- always_run: false + as: e2e-aws-autonode-standalone-ko + capabilities: + - arm64 + optional: true + steps: + cluster_profile: hypershift-aws + env: + ENABLE_STANDALONE_KARPENTER_OPERATOR: "true" + TECH_PREVIEW_NO_UPGRADE: "true" + TEST_PLAN: | + name: autonode-standalone-ko + platform: aws + testMatrix: + parallel: + - name: karpenter + variant: karpenter + labelFilter: karpenter + workflow: hypershift-aws-e2e-v2 - as: verify-deps capabilities: - arm64 diff --git a/ci-operator/jobs/openshift/hypershift/openshift-hypershift-main-presubmits.yaml b/ci-operator/jobs/openshift/hypershift/openshift-hypershift-main-presubmits.yaml index 222c8b90633d6..c64af07283161 100644 --- a/ci-operator/jobs/openshift/hypershift/openshift-hypershift-main-presubmits.yaml +++ b/ci-operator/jobs/openshift/hypershift/openshift-hypershift-main-presubmits.yaml @@ -972,6 +972,94 @@ presubmits: secret: secretName: result-aggregator trigger: (?m)^/test( | .* )e2e-aws-autonode,?($|\s.*) + - agent: kubernetes + always_run: false + branches: + - ^main$ + - ^main- + cluster: build09 + context: ci/prow/e2e-aws-autonode-standalone-ko + decorate: true + decoration_config: + sparse_checkout_files: + - .ci-operator.yaml + - Dockerfile + - Dockerfile.control-plane + - Dockerfile.e2e + labels: + capability/arm64: arm64 + ci-operator.openshift.io/cloud: hypershift-aws + ci-operator.openshift.io/cloud-cluster-profile: hypershift-aws + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-hypershift-main-e2e-aws-autonode-standalone-ko + optional: true + rerun_command: /test e2e-aws-autonode-standalone-ko + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-aws-autonode-standalone-ko + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-aws-autonode-standalone-ko,?($|\s.*) - agent: kubernetes always_run: false branches: diff --git a/ci-operator/step-registry/hypershift/install/hypershift-install-commands.sh b/ci-operator/step-registry/hypershift/install/hypershift-install-commands.sh index 235633d8a362e..0e8ce0e2fd757 100755 --- a/ci-operator/step-registry/hypershift/install/hypershift-install-commands.sh +++ b/ci-operator/step-registry/hypershift/install/hypershift-install-commands.sh @@ -67,6 +67,10 @@ if [ "${TECH_PREVIEW_NO_UPGRADE}" = "true" ]; then EXTRA_ARGS="${EXTRA_ARGS} --tech-preview-no-upgrade" fi +if [ "${ENABLE_STANDALONE_KARPENTER_OPERATOR}" = "true" ]; then + EXTRA_ARGS="${EXTRA_ARGS} --enable-standalone-karpenter-operator" +fi + if [ "${ENABLE_HYPERSHIFT_OPERATOR_DEFAULTING_WEBHOOK}" = "true" ]; then EXTRA_ARGS="${EXTRA_ARGS} --enable-defaulting-webhook=true" fi diff --git a/ci-operator/step-registry/hypershift/install/hypershift-install-ref.yaml b/ci-operator/step-registry/hypershift/install/hypershift-install-ref.yaml index 8e3bddd5ee6c9..d5573c0802c36 100644 --- a/ci-operator/step-registry/hypershift/install/hypershift-install-ref.yaml +++ b/ci-operator/step-registry/hypershift/install/hypershift-install-ref.yaml @@ -56,6 +56,9 @@ ref: - name: AZURE_PLS_RESOURCE_GROUP default: "" documentation: "Azure resource group of the management cluster where Private Link Services reside. Falls back to SHARED_DIR/azure_pls_resource_group if empty." + - name: ENABLE_STANDALONE_KARPENTER_OPERATOR + default: "false" + documentation: "If true, the HyperShift operator deploys the standalone karpenter-operator binary instead of the embedded karpenter-operator. Requires TECH_PREVIEW_NO_UPGRADE=true." - name: OVERRIDE_HYPERSHIFT_OPERATOR_IMAGE default: "" documentation: "If set, overrides both the HyperShift Operator image and the hcp CLI used during install, bypassing the pipeline ImageStream dependency resolution. Used by the HO release controller."