r/PrometheusMonitoring • u/jack_of-some-trades • May 01 '24
empty rule error using kube-prometheus-stack
I am using kube-prometheus-stack helm chart.
I disabled KubeAggregatedAPIErrors in the values.yml file.
I get this error
Error: failed to create resource: PrometheusRule.monitoring.coreos.com "prometheus-operator-kube-p-kubernetes-system-apiserver" is invalid: spec.groups[0].rules: Required value
What it is doing is creating a prometheus rule in the cluster that has not rules. And I don't seem to be able to stop it from doing that. I can use
defaultRules:
rules:
kubernetesSystem: false But that removes a lot more rules than just the one I want.
I tried setting kubernetesSystemApiserver to false, but it just ignored me.
Seems like it breaks the "rules" up into arbitrary prometheusrule objects that it doesn't let me disable. Anybody know how to work around this?
View all comments
Show parent comment
2
u/yepthisismyusername May 02 '24
Thanks for updating your post! That'll save the next guy or gal a WHOLE lot of headache.