diff --git a/Makefile b/Makefile index 505ade1ed56c..85a7cc029bb2 100644 --- a/Makefile +++ b/Makefile @@ -672,7 +672,7 @@ cpo-container-sync: # - current context to be set to a hosted cluster with AutoNode enabled. # - an annotation to be applied to the HCP to stop reconcillation (hypershift.openshift.io/karpenter-core-e2e-override=true) .PHONY: karpenter-upstream-e2e -karpenter-upstream-e2e: +karpenter-upstream-e2e: $(YQ) ./karpenter-operator/e2e/upstream-e2e.sh ## -------------------------------------- diff --git a/karpenter-operator/e2e/adjust-ec2nodeclass.sh b/karpenter-operator/e2e/adjust-ec2nodeclass.sh index 86f71706079e..88aebd93151a 100755 --- a/karpenter-operator/e2e/adjust-ec2nodeclass.sh +++ b/karpenter-operator/e2e/adjust-ec2nodeclass.sh @@ -2,8 +2,12 @@ FILE=$1 +SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +REPO_ROOT=$(cd "${SCRIPT_DIR}/../.." && pwd) +YQ="${REPO_ROOT}/hack/tools/bin/yq" + # delete metadata fields -yq 'del(.metadata.creationTimestamp, .metadata.generation, .metadata.managedFields, .metadata.resourceVersion, .metadata.selfLink, .metadata.uid)' -i "$FILE" +$YQ 'del(.metadata.creationTimestamp, .metadata.generation, .metadata.managedFields, .metadata.resourceVersion, .metadata.selfLink, .metadata.uid)' -i "$FILE" # delete status -yq 'del(.status)' -i "$FILE" +$YQ 'del(.status)' -i "$FILE"