diff --git a/manifests/grafana/deployment.yaml b/manifests/grafana/deployment.yaml index 8e18c46..2881a6e 100644 --- a/manifests/grafana/deployment.yaml +++ b/manifests/grafana/deployment.yaml @@ -18,8 +18,7 @@ spec: - 0 containers: - name: grafana - image: grafana/grafana:10.0.1 - imagePullPolicy: IfNotPresent + image: grafana/grafana:10.0.3 ports: - containerPort: 3000 readinessProbe: diff --git a/manifests/grafana/kustomization.yaml b/manifests/grafana/kustomization.yaml index f9b471f..a8a1b91 100644 --- a/manifests/grafana/kustomization.yaml +++ b/manifests/grafana/kustomization.yaml @@ -5,6 +5,7 @@ resources: - pvc.yaml - service.yaml - ingress.yaml + - servicemonitor.yaml - database.yaml - datasources.yaml - deployment.yaml diff --git a/manifests/grafana/service.yaml b/manifests/grafana/service.yaml index 029e9a5..7a14ea2 100644 --- a/manifests/grafana/service.yaml +++ b/manifests/grafana/service.yaml @@ -3,6 +3,8 @@ kind: Service metadata: name: grafana-svc namespace: monitoring + labels: + app.kubernetes.io/name: grafana spec: ports: - name: http diff --git a/manifests/grafana/servicemonitor.yaml b/manifests/grafana/servicemonitor.yaml new file mode 100644 index 0000000..a6fe236 --- /dev/null +++ b/manifests/grafana/servicemonitor.yaml @@ -0,0 +1,14 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: grafana + namespace: monitoring + labels: + team: core +spec: + selector: + matchLabels: + app.kubernetes.io/name: grafana + endpoints: + - port: http + path: /metrics