You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug a clear and concise description of what the bug is.
There is a problem with the additionalMetricsRelabels for Service selfMonitor.
When using config-reloader, then inside the template for it there isn't even an option for it to be loaded and it's ignored. Even though it can be added inside values.
For the selfMonitor for the blackbox-exporter itself, there is a section for additionalMetrics, which adds them
Which doesn't work because this expects an array, but in values we expect a map.
It seems the easiest fix is either, to change the expected type for additionalMetricsRelabels to an array inside the values. Or use the working template for serviceMonitor metricRellabeling and use that one for selfServiceMonitor.
We bumped the version from 8.16.0 to 9.0.0 which activated the option for AdditionalMetricRelabeling. Since we had it in a map, but it started expecting array our deployment failed and we had to figure out what happened.
The error we got was
error validating data: ValidationError(ServiceMonitor.spec.endpoints[0].metricRelabelings): invalid type for com.coreos.monitoring.v1.ServiceMonitor.spec.endpoints.metricRelabelings: got "map", expected "array"
When we tried to use array we got:
coalesce.go:286: warning: cannot overwrite table with non table for blackbox-exporter.prometheus-blackbox-exporter.serviceMonitor.selfMonitor.additionalMetricsRelabels (map[])
What you expected to happen?
Nothing, everything to keep "working" as before. But well we found out some things did not ever work.
owantula
changed the title
[prometheus-blackbox-exporter] Issue Title
[prometheus-blackbox-exporter] Problem with Metric Relabelings for Self Monitor.
Sep 12, 2024
Describe the bug a clear and concise description of what the bug is.
There is a problem with the additionalMetricsRelabels for Service selfMonitor.
When using config-reloader, then inside the template for it there isn't even an option for it to be loaded and it's ignored. Even though it can be added inside values.
It misses the metricRelabelings: section in here:
For the selfMonitor for the blackbox-exporter itself, there is a section for additionalMetrics, which adds them
Which doesn't work because this expects an array, but in values we expect a map.
It seems the easiest fix is either, to change the expected type for additionalMetricsRelabels to an array inside the values. Or use the working template for serviceMonitor metricRellabeling and use that one for selfServiceMonitor.
What's your helm version?
version.BuildInfo{Version:"v3.15.4", GitCommit:"fa9efb07d9d8debbb4306d72af76a383895aa8c4", GitTreeState:"clean", GoVersion:"go1.22.6"}
What's your kubectl version?
Client Version: v1.31.0
Which chart?
prometheus-blackbox-exporter
What's the chart version?
9.0.0
What happened?
We bumped the version from 8.16.0 to 9.0.0 which activated the option for AdditionalMetricRelabeling. Since we had it in a map, but it started expecting array our deployment failed and we had to figure out what happened.
The error we got was
error validating data: ValidationError(ServiceMonitor.spec.endpoints[0].metricRelabelings): invalid type for com.coreos.monitoring.v1.ServiceMonitor.spec.endpoints.metricRelabelings: got "map", expected "array"
When we tried to use array we got:
coalesce.go:286: warning: cannot overwrite table with non table for blackbox-exporter.prometheus-blackbox-exporter.serviceMonitor.selfMonitor.additionalMetricsRelabels (map[])
What you expected to happen?
Nothing, everything to keep "working" as before. But well we found out some things did not ever work.
How to reproduce it?
Enable additionalMetricsRelabels, inside selfServiceMonitor.
Enter the changed values of values.yaml?
Enter the command that you execute and failing/misfunctioning.
Used our script, we use for templating with our ArgoCD. But it was just helm template with few parameters.
helm template --api-versions=${KUBE_API_VERSIONS} --kube-version=${KUBE_VERSION} ${ARGOCD_ENV_RELEASE_NAME:-wandera} ${NAMESPACE_PARAM} ${ARGOCD_ENV_HELM_ARGS} $(printf " -f %s.yaml " "${VALUES[@]}") . > all.yaml
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: