diff --git a/build/Makefile b/build/Makefile index cd30c01461..4c0a8cf3ff 100644 --- a/build/Makefile +++ b/build/Makefile @@ -387,6 +387,7 @@ install: LOG_LEVEL := "debug" install: EXTERNAL_IP ?= $(shell $(DOCKER_RUN) kubectl get services agones-allocator -n agones-system -o jsonpath='{.status.loadBalancer.ingress[0].ip}') install: FEATURE_GATES ?= $(ALPHA_FEATURE_GATES) install: SERVICE_MONITOR := false +install: CONTROLLER_SAFE_TO_EVICT := false # TODO(#2797): Remove when `SplitControllerAndExtensions` => safe-to-evict=true install: HELM_ARGS ?= install: $(ensure-build-image) install-custom-pull-secret -$(DOCKER_RUN) bash -c '[[ $$(helm status agones -n agones-system --output json | jq -r ".info.status") =~ (failed|pending-.*) ]] && helm uninstall agones --namespace=agones-system || true' @@ -403,6 +404,7 @@ install: $(ensure-build-image) install-custom-pull-secret --set agones.featureGates=$(FEATURE_GATES) \ --set agones.allocator.service.loadBalancerIP=$(EXTERNAL_IP) \ --set agones.metrics.serviceMonitor.enabled=$(SERVICE_MONITOR) \ + --set agones.controller.safeToEvict=$(CONTROLLER_SAFE_TO_EVICT) \ $(HELM_ARGS) \ agones $(mount_path)/install/helm/agones/ diff --git a/build/e2e-image/e2e.sh b/build/e2e-image/e2e.sh index 9b372a5641..c155a87312 100755 --- a/build/e2e-image/e2e.sh +++ b/build/e2e-image/e2e.sh @@ -21,7 +21,8 @@ echo $FEATURES echo $REGISTRY set -e echo "installing current release" -DOCKER_RUN= make install FEATURE_GATES='"'$FEATURES'"' REGISTRY='"'$REGISTRY'"' +# TODO(#2797): Remove when `SplitControllerAndExtensions` => safe-to-evict=true +DOCKER_RUN= make install FEATURE_GATES='"'$FEATURES'"' REGISTRY='"'$REGISTRY'"' CONTROLLER_SAFE_TO_EVICT=true echo "starting e2e test" DOCKER_RUN= make test-e2e ARGS=-parallel=16 E2E_USE_GOTESTSUM=true GOTESTSUM_VERBOSE=true FEATURE_GATES='"'$FEATURES'"' echo "completed e2e test" \ No newline at end of file diff --git a/build/e2e-image/entrypoint.sh b/build/e2e-image/entrypoint.sh index 6f7b952106..6af536f327 100644 --- a/build/e2e-image/entrypoint.sh +++ b/build/e2e-image/entrypoint.sh @@ -16,7 +16,8 @@ set -e FEATURES=$1 TEST_CLUSTER_NAME=$2 -REGISTRY=$3 +TEST_CLUSTER_LOCATION=$3 +REGISTRY=$4 echo $FEATURES export SHELL="/bin/bash" @@ -29,7 +30,7 @@ then gcloud auth login fi gcloud container clusters get-credentials $TEST_CLUSTER_NAME \ - --zone=us-west1-c --project=agones-images + --zone=${TEST_CLUSTER_LOCATION} --project=agones-images kubectl port-forward statefulset/consul-consul-server 8500:8500 & echo "Waiting consul port-forward to launch on 8500..." timeout 60 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' 127.0.0.1 8500 diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 986a660bbc..49c985c84c 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -255,6 +255,7 @@ steps: args: - 'CustomFasSyncInterval=false&SDKGracefulTermination=false&StateAllocationFilter=false&PlayerAllocationFilter=true&PlayerTracking=true&ResetMetricsOnDelete=true&SafeToEvict=true&PodHostname=true&Example=true' - 'e2e-test-cluster' + - 'us-west1-c' - "${_REGISTRY}" id: e2e-feature-gates waitFor: @@ -269,12 +270,46 @@ steps: args: - '' - 'e2e-test-cluster' + - 'us-west1-c' - "${_REGISTRY}" id: e2e-stable waitFor: - push-images - build-e2e +# +# Run the e2e tests on GKE Autopilot with FeatureGates inverted compared to Stable +# +# Keep in sync with (the inverse of) pkg/util/runtime/features.go:featureDefaults + +- name: 'e2e-runner' + args: + - 'CustomFasSyncInterval=false&SDKGracefulTermination=false&StateAllocationFilter=false&PlayerAllocationFilter=true&PlayerTracking=true&ResetMetricsOnDelete=true&SafeToEvict=true&PodHostname=true&Example=true' + - 'gke-autopilot-e2e-test-cluster-1-24' + - 'us-west1' + - "${_REGISTRY}" + id: e2e-feature-gates-gke-autopilot + allowFailure: true # for now, run the step but don't block on it + waitFor: + - push-images + - build-e2e + +# +# Run the e2e tests on GKE Autopilot without FeatureGates, except SafeToEvict, which we need on Autopilot +# + +- name: 'e2e-runner' + args: + - 'SafeToEvict=true' + - 'gke-autopilot-e2e-test-cluster-1-24' + - 'us-west1' + - "${_REGISTRY}" + id: e2e-stable-gke-autopilot + allowFailure: true # for now, run the step but don't block on it + waitFor: + - push-images + - build-e2e + # # SDK conformance tests #