acceptance,e2e: Enhance E2E test and deploy.sh to support scaleDownDelaySeconds~ and minReplicas for HRA
This commit is contained in:
		
							parent
							
								
									a6f0e0008f
								
							
						
					
					
						commit
						d4a9750e20
					
				|  | @ -83,7 +83,7 @@ else | |||
| fi | ||||
| 
 | ||||
| if [ -n "${TEST_ORG}" ]; then | ||||
|   cat acceptance/testdata/runnerdeploy.envsubst.yaml | TEST_ENTERPRISE= TEST_REPO= NAME=org-runnerdeploy envsubst | kubectl apply -f - | ||||
|   cat acceptance/testdata/runnerdeploy.envsubst.yaml | TEST_ENTERPRISE= TEST_REPO= RUNNER_MIN_REPLICAS=${ORG_RUNNER_MIN_REPLICAS} NAME=org-runnerdeploy envsubst | kubectl apply -f - | ||||
| 
 | ||||
|   if [ -n "${TEST_ORG_GROUP}" ]; then | ||||
|     cat acceptance/testdata/runnerdeploy.envsubst.yaml | TEST_ENTERPRISE= TEST_REPO= TEST_GROUP=${TEST_ORG_GROUP} NAME=orggroup-runnerdeploy envsubst | kubectl apply -f - | ||||
|  |  | |||
|  | @ -58,5 +58,6 @@ spec: | |||
|   - githubEvent: {} | ||||
|     amount: 1 | ||||
|     duration: "1m" | ||||
|   minReplicas: 0 | ||||
|   minReplicas: ${RUNNER_MIN_REPLICAS} | ||||
|   maxReplicas: 10 | ||||
|   scaleDownDelaySecondsAfterScaleOut: ${RUNNER_SCALE_DOWN_DELAY_SECONDS_AFTER_SCALE_OUT} | ||||
|  |  | |||
|  | @ -180,6 +180,8 @@ type env struct { | |||
| 	githubTokenWebhook                                       string | ||||
| 	testEnterprise                                           string | ||||
| 	featureFlagEphemeral                                     bool | ||||
| 	scaleDownDelaySecondsAfterScaleOut                       int64 | ||||
| 	minReplicas                                              int64 | ||||
| 	dockerdWithinRunnerContainer                             bool | ||||
| 	testJobs                                                 []job | ||||
| } | ||||
|  | @ -210,6 +212,8 @@ func initTestEnv(t *testing.T) *env { | |||
| 	e.testJobs = createTestJobs(id, testResultCMNamePrefix, 100) | ||||
| 	ephemeral, _ := strconv.ParseBool(testing.Getenv(t, "TEST_FEATURE_FLAG_EPHEMERAL")) | ||||
| 	e.featureFlagEphemeral = ephemeral | ||||
| 	e.scaleDownDelaySecondsAfterScaleOut, _ = strconv.ParseInt(testing.Getenv(t, "TEST_RUNNER_SCALE_DOWN_DELAY_SECONDS_AFTER_SCALE_OUT", "10"), 10, 32) | ||||
| 	e.minReplicas, _ = strconv.ParseInt(testing.Getenv(t, "TEST_RUNNER_MIN_REPLICAS", "1"), 10, 32) | ||||
| 
 | ||||
| 	var err error | ||||
| 	e.dockerdWithinRunnerContainer, err = strconv.ParseBool(testing.Getenv(t, "TEST_RUNNER_DOCKERD_WITHIN_RUNNER_CONTAINER", "false")) | ||||
|  | @ -272,6 +276,8 @@ func (e *env) installActionsRunnerController(t *testing.T) { | |||
| 		"RUNNER_LABEL=" + e.runnerLabel, | ||||
| 		"TEST_ID=" + e.testID, | ||||
| 		fmt.Sprintf("RUNNER_FEATURE_FLAG_EPHEMERAL=%v", e.featureFlagEphemeral), | ||||
| 		fmt.Sprintf("RUNNER_SCALE_DOWN_DELAY_SECONDS_AFTER_SCALE_OUT=%d", e.scaleDownDelaySecondsAfterScaleOut), | ||||
| 		fmt.Sprintf("ORG_RUNNER_MIN_REPLICAS=%d", e.minReplicas), | ||||
| 	} | ||||
| 
 | ||||
| 	if e.dockerdWithinRunnerContainer { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue