cloudfoundry / cf-k8s-networking

building a cloud foundry without gorouter....
Apache License 2.0
32 stars 17 forks source link

Add an overlay to provision creds and configure mTLS for Prometheus #64

Closed mike1808 closed 4 years ago

mike1808 commented 4 years ago

To allow Prometheus to communicate with Istio sidecar injected pods it has to have required credentials. To provision these credentials we manually inject istio-proxy sidecar to the Prometheus server deployment generated by helm template cf-for-k8s-prometheus stable/prometheus -n cf-system --set server.podLabels.what\-am\-i=prometheus command. The proxy sidecar will generate the key and certificates and put them to /etc/istio-certs. Then we configure Prometheus config to use these certs for requesting metrics endpoints on the node.

To test this overlay you have to deploy Prometheus. Follow Prometheus installation guideline from cf-for-k8s-metric team but instead of using helm install use helm template and save the generated YAML to some file, then apply the overlay by ytt -f <prometheus.yaml> -f config/values.yaml -f config/provision-prometheus-certs.yaml

The overlay is based on:

#174408928

cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/174557817

The labels on this github issue will be updated when the story is started.