Comments (7)
Yess, thank you that's working.
Lessons learned: next time just look at the CRD's :)
Sorry for bothering
BR
from charts.
Hi @toporek3112
Does your ServiceMonitor looks like this?
$ helm template kube-prometheus oci://registry-1.docker.io/bitnamicharts/kube-prometheus -f custom-values.yaml -s templates/exporters/kubelet/servicemonitor.yaml
Pulled: registry-1.docker.io/bitnamicharts/kube-prometheus:9.2.1
Digest: sha256:61e0fcee27d9f84a7beb25b33d459eef104ef2e806c180cc7e5b3aad3f610cd4
---
# Source: kube-prometheus/templates/exporters/kubelet/servicemonitor.yaml
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: kube-prometheus-kubelet
namespace: "default"
labels:
app.kubernetes.io/instance: kube-prometheus
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: kube-prometheus
app.kubernetes.io/version: 0.74.0
helm.sh/chart: kube-prometheus-9.2.1
app.kubernetes.io/component: kubelet
spec:
jobLabel: k8s-app
selector:
matchLabels:
k8s-app: kubelet
namespaceSelector:
matchNames:
- kube-system
endpoints:
- port: https-metrics
scheme: https
tlsConfig:
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
serverName: kubernetes
insecureSkipVerify: true
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
honorLabels: true
relabelings:
- action: replace
replacement: ${labelCluster}
target_label: cluster
- port: https-metrics
scheme: https
path: /metrics/cadvisor
honorLabels: true
tlsConfig:
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
serverName: kubernetes
insecureSkipVerify: true
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
from charts.
So I tried applying it again where my values.yaml was:
kubelet:
enabled: true
namespace: namespace
serviceMonitor:
https: true
interval: ""
relabelings:
- action: replace
replacement: ${labelCluster}
target_label: cluster
and the deployed serviceMonitor yaml was:
relabelings:
- action: replace
replacement: [The actual value of ${labelCluster}]
Besides that the serviceMonitor looks same as yours. I don't understand why the target_label key is missing in the serviceMonitor. What am I doing wrong? Or is it a bug of some sort? Idk if it helps but I'm using terraform to deploy this helm chart and the terraform preview is also showing me the correct config like:
kubelet:
enabled: true
namespace: namespace
serviceMonitor:
https: true
interval: ""
relabelings:
- action: replace
replacement: [The actual value of ${labelCluster}]
target_label: cluster
from charts.
I also would have a different question. Is there a way to configure appending a label to all scraped metrics/alle jobs? Like maybe in the global section? But how to configure it for the helm chart?
from charts.
Today I also was trying to configure this but it seems not to work...
https://github.com/bitnami/charts/blob/kube-prometheus/8.17.1/bitnami/kube-prometheus/templates/prometheus/prometheus.yaml#L62
from charts.
Hi @toporek3112
Besides that the serviceMonitor looks same as yours. I don't understand why the
target_label
key is missing in the serviceMonitor. What am I doing wrong? Or is it a bug of some sort?
It should be targetLabel
instead of target_label
according to the CRD:
from charts.
I'm glad it worked, proceeding to close the issue. Feel free to reopen it if you require further assistance
from charts.
Related Issues (20)
- [bitnami/mongodb] Add client.pem in mongoDB chart with TLS enabled HOT 3
- tls.extraDnsNames is wrongly documented in values.yaml HOT 2
- [bitnami/common] Add a possibility to omit empty seLinuxOptions property from non-OpenShift environments HOT 3
- No documentation for upgrading to helm chart of version 22.x HOT 1
- [bitnami/mysql] Pod keeps being not ready and Mysqladmin tries to connect to `/tmp/mysql.sock` HOT 7
- [bitnami/postgresql] Helm pull failed but install works HOT 1
- Add extraHosts and hosts from extraRules to tls block of Ingress resource HOT 4
- [bitnami/etcd] Etcd cronjob etcd-snapshotter is invalid HOT 1
- [bitnami/airflow] load dags initcontainer does not have resources section HOT 1
- [bitnami/redis-cluster] Allow to do Helm Upgrade without the `--set password=$REDIS_PASSWORD` HOT 4
- [bitnami/postgresql-ha] XX000: unable to get session context , Unable to create a database when connecting via Pgpool. HOT 4
- [bitnami/elasticsearch] ServiceAccount not getting added and creation of the wrong serviceaccount HOT 3
- [bitnami/keycloak] Keycloak Version 25.x.x and Metrics Exposure HOT 3
- [bitnami/mlflow] Allow setting resources for default init containers HOT 3
- [bitnami/zookeeper] Bitnami Support to onboard zookeeper into enterprise HOT 4
- [bitnami/kube-prometheus] UPGRADE FAILED: create: failed to create: Secret "sh.helm.release.v1.kube-prometheus.v3" is invalid: data: Too long: must have at most 1048576 bytes HOT 1
- [bitnami/wordpress] Switch from database in namespace to external database in AWS RDS Mariadb
- [bitnami/mariadb] Readiness probe failed: mysqladmin: Deprecated program name HOT 2
- [bitnami/rabbitmq] RabbitMq (non cluster-operator) is not starting on Rancher HOT 5
- [bitnami/minio] `defaultBuckets` causes errors in `distributed` mode HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from charts.