Sync envtest optimization across all operators #1811
Merged
+3
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.