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

Reject PrometheusRule objects that generate > 512KiB configmap #6478

Open
simonpasquier opened this issue Apr 5, 2024 · 2 comments · May be fixed by #6606
Open

Reject PrometheusRule objects that generate > 512KiB configmap #6478

simonpasquier opened this issue Apr 5, 2024 · 2 comments · May be fixed by #6606

Comments

@simonpasquier
Copy link
Contributor

          @simonpasquier the title of the issue was generic decently generic, I'm happy to open a new issue as I realize my proposed question is not directly related.

The error is obvious:

level=error ts=2024-03-21T13:51:21.598484221Z caller=klog.go:116 component=k8s_client_runtime func=ErrorDepth msg="sync \"monitoring/kube-prometheus-stack-prometheus\" failed: failed to make rules ConfigMaps: rule file 'monitoring-kube-prometheus-stack-metrics-catalog-rules-aws-836e95d3-92a2-493e-bee9-6a33bb2cc55b.yaml' is too large for a single Kubernetes ConfigMap"

In this case, the ruleset that the CRD is trying to create simply exceeds the 1MB limit for ConfigMaps. So I know the problem, but I'm hoping we can move this error to prior to the CRD accepting the change and thus failing the deployment. Otherwise, I don't know things are wrong until my attempt at looking at data showcases that I'm missing rules.

Originally posted by @jtslear in #5085 (comment)

@simonpasquier
Copy link
Contributor Author

simonpasquier commented Apr 5, 2024

@jtslear IIUC correctly your problem, you've got a PrometheusRule which by itself is above the 1MB limit?
In this case, yes it would be a good idea for the validating webhook service to reject the object in the first place.

@simonpasquier simonpasquier changed the title @simonpasquier the title of the issue was generic decently generic, I'm happy to open a new issue as I realize my proposed question is not directly related. The operator fails to reconcile when a single PrometheusRule object generates > 1MB configmap Apr 18, 2024
@simonpasquier simonpasquier changed the title The operator fails to reconcile when a single PrometheusRule object generates > 1MB configmap Reject PrometheusRule objects that generate > 1MB configmap Apr 18, 2024
@yp969803
Copy link
Contributor

/assign

yp969803 added a commit to yp969803/prometheus-operator that referenced this issue May 18, 2024
@yp969803 yp969803 linked a pull request May 18, 2024 that will close this issue
5 tasks
@simonpasquier simonpasquier changed the title Reject PrometheusRule objects that generate > 1MB configmap Reject PrometheusRule objects that generate > 512KB configmap May 21, 2024
@simonpasquier simonpasquier changed the title Reject PrometheusRule objects that generate > 512KB configmap Reject PrometheusRule objects that generate > 512KiB configmap May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants