contrib/kube: Add rbac role to discover prometheus
The current example-app setup in the kube-prometheus project is able to discover scraping targets in the default namespace. It is not able to discover the configured Alertmanager in the monitoring namespace. This patch adds an alertmanager-discovery rbac role, to permit the above described action. In addition it does the following cleanups: - Remove kubeconfig configuration in deploy and teardown script. kubectl chooses .kube/config whenever KUBECONFIG is not set by default - Remove namespace specification option via NAMESPACE env var. In most of the manifests the metadata/namespace was hardcoded anyways, in addition in the promtheus frontend role binding the service account namespace is hardcoded to default as well. - Instead of `kubectl {apply,delete}` individual manifests, the deploy and teardown shell scripts {apply,delete} on the entire folder.
Showing
- hack/example-service-monitoring/deploy 1 addition, 16 deletionshack/example-service-monitoring/deploy
- hack/example-service-monitoring/teardown 1 addition, 10 deletionshack/example-service-monitoring/teardown
- manifests/examples/example-app/example-app.yaml 2 additions, 0 deletionsmanifests/examples/example-app/example-app.yaml
- manifests/examples/example-app/prometheus-frontend-alertmanager-discovery-role-binding.yaml 13 additions, 0 deletions...metheus-frontend-alertmanager-discovery-role-binding.yaml
- manifests/examples/example-app/prometheus-frontend-alertmanager-discovery-role.yaml 12 additions, 0 deletions...-app/prometheus-frontend-alertmanager-discovery-role.yaml
- manifests/examples/example-app/prometheus-frontend-service-account.yaml 1 addition, 0 deletions...ples/example-app/prometheus-frontend-service-account.yaml
- manifests/examples/example-app/prometheus-frontend-svc.yaml 1 addition, 0 deletionsmanifests/examples/example-app/prometheus-frontend-svc.yaml
- manifests/examples/example-app/servicemonitor-frontend.yaml 2 additions, 1 deletionmanifests/examples/example-app/servicemonitor-frontend.yaml
Loading
Please register or sign in to comment