charts
charts copied to clipboard
[chart/grafana-agent][REQUEST] support hashmod with Statefulset
Is your feature request related to a problem? Please describe. No
Describe the solution you'd like
- Add following values. Default should be hostname mode.
scrapingServiceMode:
enabled: false
hashmod:
enabled: false
hostname:
enabled: true
- Add Statefulset Manifest
- Add
PODNAMEenvironment
- name: PODNAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- Add hashmod configuration in agent configs
- action: hashmod
source_labels: [__address__]
modulus: {{ .Values.replicaCount }}
target_label: __tmp_hashmod
- action: keep
source_labels: [__tmp_hashmod]
regex: ^${PODNAME##*-}$ # to get index from pod name
Additional context
This is for some environments that cannot use Grafana Operator but want to use hashmod.
Should write how to configure hashmod in README file
Please let me know your opinion or better idea. I already customized it from our environment so it will be easy to add PR for me.