feat(prometheus): Support StatefulSet with Prometheus sidecar #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
The Helm chart needs to be enhanced to support the latest measurement backend (Prometheus). We can deploy Prometheus as a sidecar when operating BindPlane as a single pod StatefulSet.
/var/lib/prometheus/tsdb
/etc/prometheus
Future PRs will include the following
Testing
Tested by deploying to minikube.
minikube start helm template charts/bindplane --values test/cases/prometheus_sidecar/values.yaml | kubectl apply -f -
Setup port forwarding.
Connect to bindplane at http://localhost:3011
Connect to prometheus at http://localhost:9999
Create a k8s node config and deploy the agent. The agent will connect to bindplane without issue because Helm's generate remote URL is correct for the minikube cluster.
Topology view will show measurements working.
The Prometheus UI will have metrics. The rollup metric will be found at
bindplane_agent_measurements:rollup:rate:1m
after waiting a few minutes.You can exec into prometheus with
kubectl exec -it release-name-bindplane-0 -c prometheus sh
The configs will be in
/etc/prometheus
and the storage will be at/var/lib/prometheus/tsdb
.ps aux
will show the following commandPlease check that the PR fulfills these requirements