-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Remove invaldBindings from smon status #7836
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
Conversation
|
@simonpasquier PTAL |
…onitorBinding function
…igResWorkloadBindingCleanup functions for improved workload binding management
|
@simonpasquier review and merge requests |
pkg/prometheus/operator.go
Outdated
| return err | ||
| } | ||
|
|
||
| // RemoveStatus remove the Prometheus or PrometheusAgent binding from the status |
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.
(nit)
| // RemoveStatus remove the Prometheus or PrometheusAgent binding from the status | |
| // RemoveServiceMonitorBinding removes the Prometheus or PrometheusAgent binding from the status |
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.
ok
test/e2e/status_subresource_test.go
Outdated
| require.NoError(t, err) | ||
| } | ||
|
|
||
| // testInvalidBindingCleanupFromSmonStatus validates ServiceMonitor status removes Prometheus refrence when the selectors are changed. |
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.
| // testInvalidBindingCleanupFromSmonStatus validates ServiceMonitor status removes Prometheus refrence when the selectors are changed. | |
| // testInvalidBindingCleanupFromSmonStatus validates that the operator removes the reference to the Prometheus resource when the ServiceMonitor isn't selected anymore by the workload. |
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.
ok
test/e2e/status_subresource_test.go
Outdated
| } | ||
|
|
||
| // testInvalidBindingCleanupFromSmonStatus validates ServiceMonitor status removes Prometheus refrence when the selectors are changed. | ||
| func testInvalidBindingCleanupFromSmonStatus(t *testing.T) { |
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.
(nit)
| func testInvalidBindingCleanupFromSmonStatus(t *testing.T) { | |
| func testGarbageCollectionOfServiceMonitorBinding(t *testing.T) { |
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.
ok
…Monitor binding management
|
@simonpasquier done the changes |
| return true | ||
| } | ||
|
|
||
| // RemoveServiceMonitorBinding removes the Prometheus or PrometheusAgent binding from the status remove the Prometheus or PrometheusAgent binding from the status |
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.
duplicate?
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.
The function is only present at once !!
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.
Sorry for being dense, I meant that the comment stutters.
Description
Remove invaldBindings from smon status
Closes: #7834
Type of change
What type of changes does your code introduce to the Prometheus operator? Put an
xin the box that apply.CHANGE(fix or feature that would cause existing functionality to not work as expected)FEATURE(non-breaking change which adds functionality)BUGFIX(non-breaking change which fixes an issue)ENHANCEMENT(non-breaking change which improves existing functionality)NONE(if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)Verification
Please check the Prometheus-Operator testing guidelines for recommendations about automated tests.
Changelog entry
Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.