Closed zyy17 closed 1 month ago
The pull request introduces several enhancements to the GreptimeDBCluster
controller and its related components. A new method, removeMonitoringDB
, is added to manage the cleanup of monitoring resources when monitoring is disabled. The reconciliation logic is updated to incorporate a check for the monitoring feature, invoking this new method as necessary. Additionally, various deployer files are modified to simplify monitoring checks by using an IsEnabled()
method. The changes also include updates to the test suite to ensure proper functionality when monitoring is disabled.
File Path | Change Summary |
---|---|
controllers/greptimedbcluster/controller.go | Added removeMonitoringDB method to clean up monitoring resources when disabled; updated Reconcile method to call this new method. |
controllers/greptimedbcluster/deployers/datanode.go, controllers/greptimedbcluster/deployers/flownode.go, controllers/greptimedbcluster/deployers/frontend.go, controllers/greptimedbcluster/deployers/meta.go | Updated monitoring checks to use IsEnabled() method; modified generatePodTemplateSpec in datanode.go to reflect new condition. |
controllers/greptimedbcluster/deployers/monitoring.go | Simplified monitoring checks in MonitoringDeployer and monitoringBuilder ; updated method logic for status checks. |
tests/e2e/greptimedbcluster/test_cluster_enable_monitoring.go | Enhanced test to disable monitoring and verify the cluster status remains PhaseRunning . |
Reconcile
method in controllers/greptimedbcluster/controller.go
, which is directly related to the enhancements made in the main PR regarding the Reconciler
struct and its methods, particularly in the context of validation logic for the GreptimeDBCluster
.GreptimeDBClusterSpec
, which aligns with the main PR's focus on managing monitoring resources and the conditional checks for monitoring features in the reconciliation process.Hop, hop, hooray, what a sight to see,
Monitoring's toggled, as easy as can be!
With a flick of a switch, resources we clear,
In the land of clusters, there's nothing to fear!
So let’s dance in the meadow, where code flows free,
For a cleaner, brighter future, just you and me! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Tests