helm-charts
helm-charts copied to clipboard
how to specifiy "-promscrape.cluster.memberNum" in vmagent helm chart when multiple replicas are configured
In VmAgent chart:
- statefulset is enabled
- replicaCount is set to 2
- under extra args promscrape.cluster.membersCount is set to 2 how do we give promscrape.cluster.memberNum argument to the vmagent?
Currently k8s doesn't support providing statefulset ordinal index to the pod. A wrapper script needs to be added before starting vmagent. This will not work if distroless images are used.
Will it be better to take hostname and get the ordinal number in k8s environments?
Hello! Maybe you can use vmagent cr in victoria-metrics-k8s-stack, operator will help build this parameter.