helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

how to specifiy "-promscrape.cluster.memberNum" in vmagent helm chart when multiple replicas are configured

Open venkatbvc opened this issue 2 years ago • 1 comments

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?

venkatbvc avatar Mar 22 '22 10:03 venkatbvc

Hello! Maybe you can use vmagent cr in victoria-metrics-k8s-stack, operator will help build this parameter.

Haleygo avatar Jul 20 '23 06:07 Haleygo