testsys: Provide advanced config control #2799
Merged
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.
Issue number:
N/A
Description of changes:
When developing TestSys, the simplicity of
cargo make test
calls can make it difficult to force certain behavior to occur. It is also possible that the default values are not the best for a user. This pr introducesDeveloperConfig
for additional control.DeveloperConfig
is intended to contain advanced configuration values that most users shouldn't need to care about. There is currently a 1:1 mapping forGenericVariantConfig : Command Line Env Variables
that I'd like to preserve which is why I created a new type.Currently there are 4 configuration values:
cluster-destruction-policy
allows users to control the destruction policy of cluster crds. The defaults currently used were carefully selected to improve the ux, but some users may want to alter this behaviorbottlerocket-destruction-policy
allows users to control the destruction policy of Bottlerocket crds.keep-tests-running
is used to set thekeep_running
field on tests. Withkeep_running: true
, the test's pods are kept in a running state until the test is deleted, as a result, the default behavior has been set tofalse
, but can be enabled if a user wishes to.image-account-id
is used to set an alternate account as the one starting AMIs are stored in. This is useful for storing AMIs in a separate account from the one testing is occurring in. Withoutimage-account-id
, a user needs to find the ami id from the account and setTESTSYS_STARTING_IMAGE_ID
. With this new variable, all manual steps are removed.Testing done:
Tested each new value and verified that the expected values were added to the CRDs.
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.