Skip to content
Snippets Groups Projects
Commit 7aca902f0a70 authored by Alexander Trost's avatar Alexander Trost
Browse files

Added README section about the prometheus-operator ServiceMonitor

Set prometheus label on ServiceMonitor as is needed for my demo.
parent 7ad43ffe4ff0
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,11 @@
* You probably also want to change the subdomain name while you are at it.
* `presentation-gitlab-k8s` with the Namespace name of your choice.
If you are using [coreos/prometheus-operator](https://github.com/coreos/prometheus-operator), then you also need to replace
`zerbytes-live-proj-monitoring` with the Namespace your Prometheus instance is running in,
in this file [`/gitlab-ci/monitoring/service-monitor.yaml`](/gitlab-ci/monitoring/service-monitor.yaml).
You then also want to `kubectl` create/apply the file to your Kubernetes cluster during creation/apply process for the manifests in [`gitlab-ci/`](/gitlab-ci/).
You also need to create a "Docker Login" Secret which contains your GitLab Registry access data (e.g. Username and Access token with registry access) named `regsecret` in the Namespace `presentation-gitlab-k8s`.
A guide for that can be found here: [Kubernetes.io - Pull an Image from a Private Registry](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/).
The Namespace manifest is in the [`gitlab-ci/`](/gitlab-ci/) directory.
......
......@@ -2,7 +2,11 @@
kind: ServiceMonitor
metadata:
name: presentation-gitlab-k8s
namespace: presentation-gitlab-k8s
# Change this to the namespace the Prometheus instance is running in
namespace: zerbytes-live-proj-monitoring
labels:
app: presentation-gitlab-k8s
prometheus: zerbytes-apl
spec:
selector:
matchLabels:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment