Skip to content

dev: add setup-dev-env* tasks and narrow multicluster setup#1505

Open
hidalgopl wants to merge 1 commit intomainfrom
pb/dev-env-task-commands
Open

dev: add setup-dev-env* tasks and narrow multicluster setup#1505
hidalgopl wants to merge 1 commit intomainfrom
pb/dev-env-task-commands

Conversation

@hidalgopl
Copy link
Copy Markdown
Contributor

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.

No changes in the operator behavior, this is just to make dev setup easier for spawning dev envs quickly.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant