-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Background
PR #93 introduced a non-destructive enable/disable pattern for Connect:
spec.connect.enabled: false— suspends Connect (removes Deployment/Service/Ingress, preserves PVC/database/secrets)spec.connect.teardown: true— destructive cleanup, only effective whenenabled: falsespec.connect.suspendedon the Connect CR — internal signal from Site controller to Connect controller
This should become an operator-wide pattern applied to Workbench, Package Manager, and Chronicle.
Work required per product
For each of Workbench, Package Manager, and Chronicle:
API changes (api/core/v1beta1/site_types.go)
- Add
Enabled *boolwith// +kubebuilder:default=truetoInternalWorkbenchSpec,InternalPackageManagerSpec,InternalChronicleSpec - Add
Teardown *boolwith// +kubebuilder:default=falseto same structs
Product CRD changes
- Add
Suspended *booltoWorkbenchSpec,PackageManagerSpec,ChronicleSpecin their respective_types.gofiles - Update
zz_generated.deepcopy.gofor all new fields - Update client-go applyconfiguration boilerplate (via
just mgenerate)
Site controller changes (internal/controller/core/)
- Add three-way branch in
reconcileResources(same as Connect):productEnabled→reconcileProduct(...)!productEnabled && productTeardown→cleanupProduct(...)(destructive)!productEnabled && !productTeardown→disableProduct(...)(non-destructive)
- Add warning log when
teardown: truewithenabled: true - Skip volume provisioning when product is disabled (pattern in
site_controller.go:187,222)
Product controller changes (internal/controller/core/<product>.go)
- Add early
Suspendedcheck at the top of the product'sReconcile/ReconcileProductfunction - Add
suspendDeployedServicemethod that deletes only Ingress, Service, Deployment (not PVC/database/secrets)
Tests (internal/controller/core/site_test.go)
TestSite<Product>DisableNeverEnabled— disable with no prior enable is a no-opTestSite<Product>SuspendAfterEnable— three-pass: enable → disable (verify Suspended=true) → re-enable (verify Suspended=nil)TestSite<Product>Teardown— two-pass: enable → teardown (verify CR deleted)
Docs
docs/api-reference.md— add.enabledand.teardownrows for each productdocs/guides/connect-configuration.mdequivalent for each product (if guides exist)docs/guides/product-team-site-management.md— update YAML examples with correct comments
Reference implementation
See PR #93 and internal/controller/core/site_controller_connect.go for the complete Connect implementation to follow.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request