Skip to content

feat(deploy-v2): add --enable-*-operator flags for bundled operators - #100

Open
kkaushik-wandb wants to merge 3 commits into
mainfrom
kkaushik/operator-cherry-pick
Open

feat(deploy-v2): add --enable-*-operator flags for bundled operators#100
kkaushik-wandb wants to merge 3 commits into
mainfrom
kkaushik/operator-cherry-pick

Conversation

@kkaushik-wandb

@kkaushik-wandb kkaushik-wandb commented Jul 23, 2026

Copy link
Copy Markdown

Summary of Changes

Adds four typed flags to wsm deploy-v2 operator so users bringing their own managed services can skip the bundled subcharts, instead of hand-editing chart values.

  • New flags (default true): --enable-moco-operator, --enable-redis-operator, --enable-seaweedfs-operator, --enable-clickhouse-operator. A normal install needs none of them.
  • Two values per disable: each sets <subchart>.enabled=false (stops the operator pod installing) and wandb-operator.operators.<key>=false (stops the W&B controller managing that service), applied via setNested after the mirror/OpenShift blocks so they win and compose without clobbering sibling keys.
  • Choices persist: the disabled set is stored in the wsm-deployment-marker ConfigMap (disabled-subcharts key), so a later flag-less wsm deploy-v2 operator upgrade keeps a subchart disabled; passing the flag again with =true re-enables it, and operator destroy clears the state. An explicit flag on any run always wins over the persisted value.
  • Note: --enable-seaweedfs-operator=false also drops prometheus-operator-crds, which shares the same chart condition.

Test Plan

  • make build — compiles clean
  • make lintgo vet + golangci-lint clean (0 issues)
  • make fmt — no diff
  • go mod tidy — no diff
  • Kind smoke test (v2), each verified via helm get values, pod state, and the marker ConfigMap:
    • each flag individually =false → that subchart's pod gone, others running
    • all four =false → all gone, operators.* all false (no clobber)
    • persistence: flag-less re-run keeps prior disables
    • re-enable =true → subcharts return, marker cleared
    • operator destroy → marker state cleared
    • invalid bool value → rejected before any cluster change

Requirements

  • Lint clean (make lint)
  • Format clean (make fmt leaves no diff)
  • go.mod / go.sum tidy (go mod tidy leaves no diff)
  • I/AI have tested the changes on this PR
  • Docs (docs/, docs/reference/commands.md, docs/reference/cr-fields.md) / CLAUDE.md updated if behavior changed

Summary by CodeRabbit

  • New Features

    • Added options to enable or disable the bundled MySQL, Redis, SeaweedFS, and ClickHouse operators during deployment.
    • Deployment choices are preserved for future upgrades when flags are omitted.
    • Uninstalling clears saved operator selections so reinstallations start with default settings.
    • Added support for using external MySQL and object storage services.
  • Documentation

    • Updated command reference, OpenShift compatibility details, available flags, examples, and persistence behavior.

kkaushik-wandb and others added 3 commits July 23, 2026 17:46
Add LoadDisabledSubcharts/SaveDisabledSubcharts to read and write a
disabled-subcharts key on the wsm-deployment-marker ConfigMap, preserving other
marker data so subchart opt-outs survive a later flag-less upgrade.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…charts

Add --enable-{moco,redis,seaweedfs,clickhouse}-operator (default true) so users
bringing their own managed services can skip the bundled operator subcharts;
each disable sets both <subchart>.enabled and wandb-operator.operators.<key>,
and the choice persists via the deployment marker so flag-less upgrades honor it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add the four flags to the deploy-v2 operator reference with a bring-your-own
example and a note that the choices persist in the deployment marker.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kkaushik-wandb
kkaushik-wandb requested a review from a team as a code owner July 23, 2026 12:23
@kkaushik-wandb kkaushik-wandb added the release:minor Release: bump minor version (vX.Y+1.0) label Jul 23, 2026
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The wsm deploy-v2 operator command now supports enabling or disabling bundled MOCO, Redis, SeaweedFS, and ClickHouse operators. Choices persist in the deployment marker ConfigMap, flow into Helm configuration, and are cleared during operator destruction.

Changes

Bundled operator enablement

Layer / File(s) Summary
Persisted state and CLI resolution
cmd/wsm/deploy_v2.go, pkg/kubectl/markers.go, docs/reference/commands.md
Adds four enablement flags, loads persisted disabled-subchart selections, and documents their behavior and examples.
Deployment plumbing and Helm values
cmd/wsm/deploy_v2.go, pkg/operator/operator.go
Passes resolved enablement values through deployment and conditionally disables matching Helm subcharts and controller management toggles.
Upgrade persistence and destroy cleanup
cmd/wsm/deploy_v2.go
Persists disabled subcharts after deployment and clears them during operator destruction.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant operatorDeployCmd
  participant performDeploy
  participant DeployOperator
  participant HelmRelease
  participant DeploymentMarker
  operatorDeployCmd->>DeploymentMarker: load disabled-subchart state
  operatorDeployCmd->>performDeploy: resolved enablement booleans
  performDeploy->>DeployOperator: bundled operator options
  DeployOperator->>HelmRelease: apply subchart and controller settings
  performDeploy->>DeploymentMarker: save disabled-subchart state
Loading

Possibly related PRs

  • wandb/wsm#56: Established the deploy-v2 operator and marker implementation extended by this change.
  • wandb/wsm#97: Modifies the same deploy-v2 flow and DeployOperator entry point.
  • wandb/wsm#99: Shares the operator uninstall and marker cleanup flow.

Suggested reviewers: danielpanzella, jthakkar04, j7m4

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise, conventional, and accurately summarizes the new bundled-operator flags.
Description check ✅ Passed The description is well structured and covers summary, test plan, and requirements with concrete details.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kkaushik/operator-cherry-pick

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:minor Release: bump minor version (vX.Y+1.0)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant