-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make HttpManagement.Enabled a pointer #1091
Conversation
No linked issues found. Please add the corresponding issues in the pull request description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, don't forget the changelog entry.
@@ -152,7 +152,7 @@ func NewDeployment(reaper *api.Reaper, dc *cassdcapi.CassandraDatacenter, keysto | |||
Value: fmt.Sprintf("%d", reaper.Spec.HeapSize.Value()), | |||
}) | |||
} | |||
if reaper.Spec.HttpManagement.Enabled { | |||
if reaper.Spec.HttpManagement.Enabled != nil && *reaper.Spec.HttpManagement.Enabled { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[suggestion] not a hard requirement, but there is a library method for this kind of expression
if reaper.Spec.HttpManagement.Enabled != nil && *reaper.Spec.HttpManagement.Enabled { | |
if pointer.BoolDeref(reaper.Spec.HttpManagement.Enabled, false) { |
f7c3348
to
874360e
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Codecov Report
@@ Coverage Diff @@
## main #1091 +/- ##
==========================================
- Coverage 57.40% 57.39% -0.01%
==========================================
Files 100 100
Lines 10192 10192
==========================================
- Hits 5851 5850 -1
- Misses 3831 3832 +1
Partials 510 510
|
What this PR does:
The HttpManagement.Enabled in the Reaper package should be a pointer, to allow for easier distinction between unset and false values. This is not important for k8ssandra-operator (where a default value of false is fine) but is relevant for downstream consumers of the types, in particular MC, where we would like to have a default value of true.
Which issue(s) this PR fixes:
Hotfix.
Checklist