You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 21, 2021. It is now read-only.
Prometheus requires the kube configuration file to be present for service discovery with Kubernetes. The only process who has access to this file on the nodes is the agent. It cannot be set by the operators.
Proposed solution
Make KUBECONFIG a variable known by the agent similarly to {{packageroot}} or {{configroot}}. Allow operators to use this variable in templates and replace it with the appropriate path.
Example
The monitoring operator creates a configmap with the fils prometheus.yaml. Therein the k8s service discovery is configured like this snipped shows:
kubernetes_sd_configs:
- role: pod
kubeconfig_file: {{KUBECONFIG}}
namespaces:
names:
- {}
selectors:
- role: pod