-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Ensure that duration fields are valid #4282
Comments
I had thought about that while creating PR but didn't get enough time back then. I will fix that |
Cool! FWIW the AlertmanagerConfig CRD also has duration fields like |
Related to prometheus-operator#4282 Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
Related to prometheus-operator#4282 Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
The same validation should be run on
|
Related to prometheus-operator#4282 Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
Related to prometheus-operator#4282 Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
Related to prometheus-operator#4282 Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
Related to prometheus-operator#4282 Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
Related to prometheus-operator#4282 Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
* pkg/prometheus/promcfg*.go: Validate EnforcedBodySizeLimit Related to #4282 Signed-off-by: Jayapriya Pai <slashpai9@gmail.com> * :* Run make tidy * pkg/prometheus/promcfg*.go: Fix error string nits * pkg/prometheus/promcfg_test.go: Update testcase check * pkg/prometheus/promcfg*.go: Fix nits
Related to prometheus-operator#4282 Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
Related to prometheus-operator#4282 Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
Related to prometheus-operator#4282 Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
Related to prometheus-operator#4282 Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
#4308) * pkg/prometheus/promcfg.go: Add validation for duration and size fields Related to #4282 Signed-off-by: Jayapriya Pai <slashpai9@gmail.com> * pkg/prometheus/promcfg.go: Fix go-linting * pkg/prometheus/promcfg.go: Update validation func for duration * pkg/prometheus/promcfg.go: Fix nits * pkg/prometheus/promcfg_test.go: Add validation tests * pkg/prometheus/promcfg_test.go: Improve readability
Fixes prometheus-operator#4282 Signed-off-by: Jayapriya Pai <slashpai9@gmail.com>
@simonpasquier is this closed by #4308 |
@philipgough We will be able to close once #4352 is merged as well, that was last one part of this fix :) |
What is missing?
The operator doesn't prevent invalid values for duration fields like
PrometheusSpec.Retention
(same is true forEnforcedBodySizeLimit
).Why do we need it?
Avoid breaking Prometheus :)
Environment
Anything else we need to know?:
The text was updated successfully, but these errors were encountered: