Skip to content

Commit

Permalink
salt: deploy ServiceMonitor object for Dex metrics
Browse files Browse the repository at this point in the history
This allows Prometheus to scrape Dex metrics

Refs: #3374
  • Loading branch information
alexandre-allard committed May 17, 2021
1 parent 6455903 commit eb70cb0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions buildchain/buildchain/salt_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ def _get_parts(self) -> Iterator[str]:
renderer=targets.Renderer.SLS,
),
Path("salt/metalk8s/addons/dex/deployed/nginx-ingress-ca-cert-configmap.sls"),
Path("salt/metalk8s/addons/dex/deployed/servicemonitor.sls"),
Path("salt/metalk8s/addons/logging/deployed/init.sls"),
targets.TemplateFile(
task_name="logs dashboard.sls",
Expand Down
1 change: 1 addition & 0 deletions salt/metalk8s/addons/dex/deployed/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ include:
- .secret
- .chart
- .clusterrolebinding
- .servicemonitor
25 changes: 25 additions & 0 deletions salt/metalk8s/addons/dex/deployed/servicemonitor.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app: dex
app.kubernetes.io/managed-by: salt
app.kubernetes.io/name: dex
app.kubernetes.io/part-of: metalk8s
heritage: metalk8s
metalk8s.scality.com/monitor: ''
name: dex
namespace: metalk8s-auth
spec:
endpoints:
- path: /metrics
port: telemetry
namespaceSelector:
matchNames:
- metalk8s-auth
selector:
matchLabels:
app.kubernetes.io/name: dex
app.kubernetes.io/instance: dex
app.kubernetes.io/component: dex

0 comments on commit eb70cb0

Please sign in to comment.