dev: add setup-dev-env* tasks and narrow multicluster setup#1505
Open
dev: add setup-dev-env* tasks and narrow multicluster setup#1505
Conversation
Add three dev-environment entry points to taskfiles/dev.yml that
mirror the existing `task dev:setup-multicluster-dev-env`
ergonomic for non-multicluster work:
task dev:setup-dev-env
Brings up a single k3s cluster with the operator + a basic
Redpanda cluster pre-applied. Equivalent to running the
acceptance suite up to AfterSetup and stopping there.
task dev:setup-dev-env-with-nodepools
Same as above plus two NodePool CRDs (3 brokers total)
pointing at the basic cluster. The pool count is wired
through `-acceptance-setup-nodepools=N` so callers can
override.
task dev:setup-multicluster-dev-env (existing)
Now passes `-groups dev-env` so the multicluster suite
narrows to stretch-cluster-basics.feature (the only
feature tagged @dev-env). Avoids running the full
multicluster suite locally just to bring up a stretch
cluster.
The implementation reuses the existing harpoon SuiteBuilder by
adding two affordances:
* SuiteBuilder.SkipFeatures() — RunT runs setup + AfterSetup
+ teardown but skips the feature execution phases. This is
the "setup only" semantic dev-env tasks need.
* `-acceptance-setup-only` testutil flag + an AfterSetup hook
in acceptance/main_test.go that applies
clusters/basic/cluster.yaml (with NodePools when N > 0)
against the freshly-stood-up cluster.
The shared operator install now scopes its --additional-cmd-flags
through a small operatorCmdFlags helper that appends
`--enable-v2-nodepools=true` only when
`-acceptance-setup-nodepools > 0`. NodePool CRDs are only
applied in that mode, so the v2 controller is only needed
there. The operator's production default for
`--enable-v2-nodepools` is left unchanged.
stretch-cluster-basics.feature gains the @dev-env tag (used by
the new -groups filter) and turns on rpkDebugBundle in its
RBAC fixture so the multicluster operator's bundle surface is
exercised end-to-end during local testing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add three dev-environment entry points to taskfiles/dev.yml that mirror the existing
task dev:setup-multicluster-dev-envergonomic for non-multicluster work:task dev:setup-dev-env
Brings up a single k3s cluster with the operator + a basic
Redpanda cluster pre-applied. Equivalent to running the
acceptance suite up to AfterSetup and stopping there.
task dev:setup-dev-env-with-nodepools
Same as above plus two NodePool CRDs (3 brokers total)
pointing at the basic cluster. The pool count is wired
through
-acceptance-setup-nodepools=Nso callers canoverride.
task dev:setup-multicluster-dev-env (existing)
Now passes
-groups dev-envso the multicluster suitenarrows to stretch-cluster-basics.feature (the only
feature tagged @dev-env). Avoids running the full
multicluster suite locally just to bring up a stretch
cluster.
The implementation reuses the existing harpoon SuiteBuilder by adding two affordances:
-acceptance-setup-onlytestutil flag + an AfterSetup hook in acceptance/main_test.go that applies clusters/basic/cluster.yaml (with NodePools when N > 0) against the freshly-stood-up cluster.The shared operator install now scopes its --additional-cmd-flags through a small operatorCmdFlags helper that appends
--enable-v2-nodepools=trueonly when-acceptance-setup-nodepools > 0. NodePool CRDs are only applied in that mode, so the v2 controller is only needed there. The operator's production default for--enable-v2-nodepoolsis left unchanged.stretch-cluster-basics.feature gains the @dev-env tag (used by the new -groups filter) and turns on rpkDebugBundle in its RBAC fixture so the multicluster operator's bundle surface is exercised end-to-end during local testing.
No changes in the operator behavior, this is just to make dev setup easier for spawning dev envs quickly.