New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing promscrape.cluster.memberNum argument in k8s is not easy as it is of type INT #2359
Comments
it must improve user expirience and simplify clustering scrapers. it must allow to use vmagent cluster with distroless images #2359
I think, it's related to Example of usage for statefulset based deployments: apiVersion: apps/v1
kind: StatefulSet
metadata:
name: vmagent
spec:
template:
spec:
containers:
- name: vmagent
args:
# must be enabled
- envflag.enable
env:
- name: promscrape_cluster_memberNum
valueFrom:
fieldRef:
fieldPath: metadata.name |
@f41gh7 Yes it is related to VMagent. |
* lib/promscrape: allows to use k8s pod name as clusterMemberNum it must improve user expirience and simplify clustering scrapers. it must allow to use vmagent cluster with distroless images #2359 * Apply suggestions from code review Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
* lib/promscrape: allows to use k8s pod name as clusterMemberNum it must improve user expirience and simplify clustering scrapers. it must allow to use vmagent cluster with distroless images #2359 * Apply suggestions from code review Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
|
Is your feature request related to a problem? Please describe.
To use cluster feature of vmagent, promscrape.cluster.memberNum argument has to be passed. In k8s, It is difficult to pass this argument unless a wrapper script is written to start the vmagent. But in distroless, we cannot have a wrapper script.
Describe the solution you'd like
In k8s, cluster version can be deployed as statefulset, ${HOSTNAME##*-} gives the oridnal number of the pod. If memberNum parameter can be evaluated from the above expression then it will ease installation in k8s environment. Or read this from a file so that proper number would be generated.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: