redis-operator
redis-operator copied to clipboard
feat: redissentinel enhancement add column of quorum, masteraddress
Description
Add column, print out info of quorum and masterAddress
kubectl get redissentinel -n default
NAME QUORUM MASTERADDRESS AGE
redis-sentinel Healthy 10.244.9.3 40m
*This PR also a pre-requisite of RedisSentinels metrics
Fixes #ISSUE
Type of change
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist
- [ ] Tests have been added/modified and all tests pass.
- [ ] Functionality/bugs have been confirmed to be unchanged or fixed.
- [x] I have performed a self-review of my own code.
- [ ] Documentation has been updated or added where necessary.
Additional Context
Codecov Report
:x: Patch coverage is 36.36364% with 49 lines in your changes missing coverage. Please review.
:warning: Please upload report for BASE (main@903520d). Learn more about missing BASE report.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| internal/k8sutils/redis.go | 0.00% | 46 Missing :warning: |
| ...ntroller/redissentinel/redissentinel_controller.go | 90.32% | 2 Missing and 1 partial :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1376 +/- ##
=======================================
Coverage ? 34.75%
=======================================
Files ? 67
Lines ? 6416
Branches ? 0
=======================================
Hits ? 2230
Misses ? 4004
Partials ? 182
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
any comment @drivebyer ?
any comment @drivebyer ?
Exporting these metrics to the CRD is slightly resource-intensive. The Sentinel deployment focuses on Redis high availability (HA). By the way, we currently reconcile RedisSentinel when there is an update to either the resource itself or the RedisReplication. Therefore, the fields in the status may not always reflect the real-time state. To understand the actual behavior of Sentinel, we should rely on the metrics provided by the exporter.
Here's the exclusion
we currently reconcile RedisSentinel when there is an update to either the resource itself or the RedisReplication
if statusResult.RequeueAfter > 0 {
return statusResult, nil
}
Here's the exclusion
we currently reconcile RedisSentinel when there is an update to either the resource itself or the RedisReplication
if statusResult.RequeueAfter > 0 { return statusResult, nil }
Got it. However, this change modifies the reconciliation logic. I think we should reconcile only when necessary, which can reduce the load on the Kubernetes cluster.
I propose that we gather more feedback on this.