Skip to content

Commit 63b248b

Browse files
stuggiclaude
andcommitted
Sync envtest optimization across all operators
With recent changes to the CI env we hit issues running envtest hitting timeouts in test since 25s was not enough, but also during kube-api startup and register custom CRDs before checks start and teardown of the kube-api. Therefore adding ControlPlaneStartTimeout and ControlPlaneStopTimeout bumping the default 60s to 120s. Also hitting slow env and with our tests, we have seen that the default cluster ip range /24 is to small, increasing to /12 Also disable not required admission plugins for envtest: ResourceQuota: This stops the "quota evaluation timed out" error. The API server will no longer try to calculate how many resources exist before letting you create new ones. ServiceAccount: This prevents the API server from looking for a ServiceAccount issuer or secret for every pod/resource. Since envtest doesn't run the ServiceAccount controller, this plugin often just causes unnecessary errors or delays. NamespaceLifecycle: (Optional but recommended) This allows you to create resources in a namespace even if the namespace is in a "Terminating" state. This is very helpful when your cleanup is slow due to CPU throttling. Signed-off-by: Martin Schuppert <mschuppert@redhat.com> Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent f46ba0f commit 63b248b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/functional/ctlplane/suite_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ var (
9999
)
100100

101101
const (
102-
timeout = time.Second * 10
102+
timeout = time.Second * 45
103103

104104
SecretName = "test-osp-secret"
105105

@@ -228,6 +228,8 @@ var _ = BeforeSuite(func() {
228228
"--request-timeout=5m",
229229
"--max-requests-inflight=800",
230230
"--max-mutating-requests-inflight=400",
231+
"--service-cluster-ip-range=10.0.0.0/12", // 65k+ IPs
232+
"--disable-admission-plugins=ResourceQuota,ServiceAccount,NamespaceLifecycle",
231233
},
232234
},
233235
Etcd: &envtest.Etcd{

0 commit comments

Comments
 (0)