File tree Expand file tree Collapse file tree 5 files changed +47
-1
lines changed
Expand file tree Collapse file tree 5 files changed +47
-1
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,22 @@ namespace: opendatahub
1313# 2. Import base configuration
1414resources :
1515 - ../../default # Inherits everything from config/default/
16+ - ../../prometheus
1617 - networkpolicy.yaml
1718
1819# 3. Delete the Namespace resource (ODH operator manages it)
20+ # Add monitoring label to PodMonitor
1921patches :
2022 - path : delete-namespace.yaml
23+ - patch : |-
24+ - op: add
25+ path: /metadata/labels/opendatahub.io~1monitoring
26+ value: "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 @@ -13,11 +13,22 @@ namespace: redhat-ods-applications
1313# 2. Import base configuration
1414resources :
1515 - ../../default # Inherits everything from config/default/
16+ - ../../prometheus
1617 - networkpolicy.yaml
1718
1819# 3. Delete the Namespace resource (RHOAI operator manages it)
20+ # Add monitoring label to PodMonitor
1921patches :
2022 - path : delete-namespace.yaml
23+ - patch : |-
24+ - op: add
25+ path: /metadata/labels/opendatahub.io~1monitoring
26+ value: "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 : system
6+ spec :
7+ podMetricsEndpoints :
8+ - port : metrics
9+ path : /metrics
10+ scheme : http
11+ selector :
12+ matchLabels :
13+ app.kubernetes.io/name : spark-operator
14+ app.kubernetes.io/component : controller
Original file line number Diff line number Diff line change @@ -14,9 +14,13 @@ CONTEXT ?= $(REPO_ROOT)
1414LOCALBIN := $(REPO_ROOT ) /bin
1515export PATH := $(LOCALBIN ) :$(PATH )
1616
17+ # CLI tool: prefer oc if available, fall back to kubectl
18+ CLI ?= $(shell command -v oc 2>/dev/null || command -v kubectl 2>/dev/null)
19+
1720# Configuration
1821KIND_CLUSTER_NAME ?= spark-operator
1922CLEANUP ?= true
23+ PODMONITOR_CRD_URL ?= https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/jsonnet/prometheus-operator/podmonitors-crd.json
2024
2125# #@ General
2226
@@ -80,8 +84,9 @@ test-docling-spark: ## Run Docling Spark test on KIND or OpenShift.
8084 CLEANUP=$(CLEANUP ) $(TESTS_DIR ) /test-docling-spark.sh
8185
8286.PHONY : e2e-kustomize-test
83- e2e-kustomize-test : # # Run Go e2e tests using Kustomize manifests for operator installation.
87+ e2e-kustomize-test : kind-setup # # Run Go e2e tests using Kustomize manifests for operator installation.
8488 @echo " Running Go e2e tests with Kustomize installation..."
89+ $(CLI ) apply -f $(PODMONITOR_CRD_URL )
8590 cd $(REPO_ROOT ) && INSTALL_METHOD=kustomize go test ./examples/openshift/tests/e2e/ -v -ginkgo.v -timeout 30m
8691
8792.PHONY : test-all
You can’t perform that action at this time.
0 commit comments