Skip to content
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

feat: add keep_dropped_targets limit to CRDs #5897

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

slashpai
Copy link
Contributor

@slashpai slashpai commented Sep 7, 2023

Fixes #5875

Description

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue.

Adds keep_dropped_targets limit to CRDs at global as well as scrape level. Also added enforced fields

Type of change

What type of changes does your code introduce to the Prometheus operator? Put an x in 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.)

Changelog entry

Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.

feat: add keep_dropped_targets limit to CRDs

Copy link
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some nits about comments and testing... definitely non-blocking

pkg/apis/monitoring/v1/prometheus_types.go Show resolved Hide resolved
pkg/prometheus/promcfg_test.go Outdated Show resolved Hide resolved
pkg/prometheus/promcfg_test.go Outdated Show resolved Hide resolved
pkg/apis/monitoring/v1/podmonitor_types.go Outdated Show resolved Hide resolved
pkg/apis/monitoring/v1/probe_types.go Outdated Show resolved Hide resolved
pkg/apis/monitoring/v1/prometheus_types.go Outdated Show resolved Hide resolved
pkg/prometheus/promcfg_test.go Outdated Show resolved Hide resolved
pkg/prometheus/promcfg_test.go Outdated Show resolved Hide resolved
@slashpai
Copy link
Contributor Author

slashpai commented Sep 7, 2023

@simonpasquier updated with changes

pkg/prometheus/promcfg_test.go Outdated Show resolved Hide resolved
pkg/prometheus/promcfg_test.go Outdated Show resolved Hide resolved
Fixes prometheus-operator#5875

Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
@slashpai
Copy link
Contributor Author

slashpai commented Sep 7, 2023

Fixed the test, I dont remember why int was used for limits in tests in past. I updated to use uint64 since thats the type anyways. Also removed redundant tests. I will create separate PR for other limit tests.

@ArthurSens ArthurSens enabled auto-merge (squash) September 7, 2023 16:47
@ArthurSens ArthurSens merged commit 0a93915 into prometheus-operator:main Sep 7, 2023
17 checks passed
@slashpai slashpai deleted the KeepDroppedTargets branch September 9, 2023 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support keep_dropped_targets setting (Prometheus v2.47)
3 participants