forked from opendatahub-io/odh-manifests
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Metrics endpoints for ODH operator (opendatahub-io#349)
* Fix ODH and Argo monitoring Signed-off-by: Anish Asthana <anishasthana1@gmail.com> * Increase replica count to 2 for HA Signed-off-by: Anish Asthana <anishasthana1@gmail.com> * Update Prometheus name and corresponding test Signed-off-by: Anish Asthana <anishasthana1@gmail.com> * Restructure Service Monitors This separate the ODH operator and ODH application monitoring into two seperate Service Monitors. Signed-off-by: Anish Asthana <anishasthana1@gmail.com>
- Loading branch information
1 parent
039f3cf
commit c52b7dd
Showing
9 changed files
with
85 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
varReference: | ||
- path: subjects/namespace | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 |
13 changes: 13 additions & 0 deletions
13
prometheus/operator/base/prometheus-monitoring-role-binding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: odh-prometheus-monitoring-rb | ||
subjects: | ||
- kind: ServiceAccount | ||
name: prometheus-k8s | ||
namespace: $(namespace) | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: odh-prometheus-monitoring |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: odh-prometheus-monitoring | ||
namespace: opendatahub | ||
rules: | ||
- verbs: | ||
- get | ||
- list | ||
- watch | ||
apiGroups: | ||
- '' | ||
resources: | ||
- services | ||
- endpoints | ||
- pods | ||
- verbs: | ||
- get | ||
apiGroups: | ||
- '' | ||
resources: | ||
- configmaps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- application-service-monitor.yaml | ||
- operator-service-monitor.yaml |
16 changes: 16 additions & 0 deletions
16
prometheus/operator/base/service-monitors/operator-service-monitor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
labels: | ||
team: opendatahub | ||
name: odh-operator-servicemonitor | ||
spec: | ||
endpoints: | ||
- port: http-metrics # Open Data Hub Operator | ||
- port: cr-metrics # Open Data Hub Operator | ||
selector: | ||
matchLabels: | ||
name: opendatahub-operator | ||
namespaceSelector: | ||
matchNames: | ||
- openshift-operators |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters