@@ -238,28 +238,24 @@ func applyManifest(path string, subs map[string]string, excludeKinds ...string)
238238}
239239
240240// createStableInfra creates the coordinator and per-phase EPP Services,
241- // ServiceAccounts, and RoleBindings once, up front, and returns their ids for
242- // suite teardown. Envoy fronts the Services via STRICT_DNS clusters and outlives
243- // the per-spec workload; recreating a Service each spec would rotate its
244- // ClusterIP and force Envoy to re-resolve, so only the Deployments behind them
245- // churn per spec. Mirrors the non-coordinator e2e, which creates the EPP
246- // Services and RBAC once in its setup and recreates only the Deployment per test.
247- func createStableInfra () []string {
248- eppManifests := []string {encodeEPPManifest , prefillEPPManifest , decodeEPPManifest }
249- // Coordinator Service + ServiceAccount, plus Service + ServiceAccount +
250- // RoleBinding per EPP.
251- objects := make ([]string , 0 , 2 + len (eppManifests )* 3 )
252-
241+ // ServiceAccounts, and RoleBindings once, up front. It appends each created id to
242+ // stableInfraObjects as it goes rather than returning them at the end, so a
243+ // partial failure still leaves the already-created objects tracked for suite
244+ // teardown. Envoy fronts the Services via STRICT_DNS clusters and outlives the
245+ // per-spec workload; recreating a Service each spec would rotate its ClusterIP and
246+ // force Envoy to re-resolve, so only the Deployments behind them churn per spec.
247+ // Mirrors the non-coordinator e2e, which creates the EPP Services and RBAC once in
248+ // its setup and recreates only the Deployment per test.
249+ func createStableInfra () {
253250 docs := e2eutil .RunKustomize (coordinatorComponentDir )
254251 docs = e2eutil .FilterKinds (docs , "ConfigMap" , "Deployment" )
255252 docs = e2eutil .SubstituteMany (docs , coordinatorSubstitutions ())
256253 docs = e2eutil .RemoveEmptyArgs (docs )
257- objects = append (objects , testutils .CreateObjsFromYaml (testConfig , docs , getNamespace ())... )
254+ stableInfraObjects = append (stableInfraObjects , testutils .CreateObjsFromYaml (testConfig , docs , getNamespace ())... )
258255
259- for _ , manifest := range eppManifests {
260- objects = append (objects , applyManifest (manifest , eppSubstitutions (), "Deployment" )... )
256+ for _ , manifest := range [] string { encodeEPPManifest , prefillEPPManifest , decodeEPPManifest } {
257+ stableInfraObjects = append (stableInfraObjects , applyManifest (manifest , eppSubstitutions (), "Deployment" )... )
261258 }
262- return objects
263259}
264260
265261func eppSubstitutions () map [string ]string {
0 commit comments