File tree Expand file tree Collapse file tree 5 files changed +44
-0
lines changed
Expand file tree Collapse file tree 5 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ resources:
2323 - ../rbac
2424 - ../manager
2525 - ../webhook
26+ - ../prometheus
2627
2728# Labels applied to all resources
2829labels :
Original file line number Diff line number Diff line change @@ -16,8 +16,19 @@ resources:
1616 - networkpolicy.yaml
1717
1818# 3. Delete the Namespace resource (ODH operator manages it)
19+ # Add monitoring label to PodMonitor
1920patches :
2021 - path : delete-namespace.yaml
22+ - patch : |-
23+ - op: add
24+ path: /metadata/labels
25+ value:
26+ opendatahub.io/monitoring: "true"
27+ target:
28+ group: monitoring.coreos.com
29+ version: v1
30+ kind: PodMonitor
31+ name: spark-operator-metrics-monitor
2132
2233# 4. Add ODH-specific labels
2334labels :
Original file line number Diff line number Diff line change @@ -16,8 +16,19 @@ resources:
1616 - networkpolicy.yaml
1717
1818# 3. Delete the Namespace resource (RHOAI operator manages it)
19+ # Add monitoring label to PodMonitor
1920patches :
2021 - path : delete-namespace.yaml
22+ - patch : |-
23+ - op: add
24+ path: /metadata/labels
25+ value:
26+ opendatahub.io/monitoring: "true"
27+ target:
28+ group: monitoring.coreos.com
29+ version: v1
30+ kind: PodMonitor
31+ name: spark-operator-metrics-monitor
2132
2233# 4. Add RHOAI-specific labels
2334labels :
Original file line number Diff line number Diff line change 1+ apiVersion : kustomize.config.k8s.io/v1beta1
2+ kind : Kustomization
3+
4+ resources :
5+ - podmonitor.yaml
Original file line number Diff line number Diff line change 1+ apiVersion : monitoring.coreos.com/v1
2+ kind : PodMonitor
3+ metadata :
4+ name : spark-operator-metrics-monitor
5+ namespace : spark-operator
6+ spec :
7+ podMetricsEndpoints :
8+ - port : metrics
9+ path : /metrics
10+ scheme : http
11+ tlsConfig :
12+ insecureSkipVerify : true
13+ selector :
14+ matchLabels :
15+ app.kubernetes.io/name : spark-operator
16+ app.kubernetes.io/component : controller
You can’t perform that action at this time.
0 commit comments