From 6449ad8dec2effcb94d9875b5eb8cf7529ea3f75 Mon Sep 17 00:00:00 2001 From: Forrest Babcock Date: Sun, 9 Aug 2026 09:05:40 -0400 Subject: [PATCH] TRT-2618: resource watch env var support --- .../openshift-release-main__nightly-5.0.yaml | 2 ++ .../openshift-release-main__nightly-5.1.yaml | 3 +++ .../observers-resource-watch-commands.sh | 13 ++++++++++--- .../observers-resource-watch-observer.yaml | 10 ++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/ci-operator/config/openshift/release/openshift-release-main__nightly-5.0.yaml b/ci-operator/config/openshift/release/openshift-release-main__nightly-5.0.yaml index 4e5ca11ad7df8..a7b21c62a3a1f 100644 --- a/ci-operator/config/openshift/release/openshift-release-main__nightly-5.0.yaml +++ b/ci-operator/config/openshift/release/openshift-release-main__nightly-5.0.yaml @@ -1652,6 +1652,8 @@ tests: cluster_profile: openshift-org-gcp env: COMPUTE_NODE_TYPE: n2-standard-8 + RESOURCE_EVENT_COLLECTION_ENABLED: "true" + RESOURCE_WATCH_ENABLED: "true" RT_ENABLED: "true" observers: enable: diff --git a/ci-operator/config/openshift/release/openshift-release-main__nightly-5.1.yaml b/ci-operator/config/openshift/release/openshift-release-main__nightly-5.1.yaml index a6a9ecec79fa3..a621e4991386a 100644 --- a/ci-operator/config/openshift/release/openshift-release-main__nightly-5.1.yaml +++ b/ci-operator/config/openshift/release/openshift-release-main__nightly-5.1.yaml @@ -1652,6 +1652,9 @@ tests: cluster_profile: openshift-org-gcp env: COMPUTE_NODE_TYPE: n2-standard-8 + RESOURCE_EVENT_COLLECTION_ENABLED: "true" + RESOURCE_MONITOR_ENABLED: "true" + RESOURCE_WATCH_ENABLED: "true" RT_ENABLED: "true" observers: enable: diff --git a/ci-operator/step-registry/observers/resource-watch/observers-resource-watch-commands.sh b/ci-operator/step-registry/observers/resource-watch/observers-resource-watch-commands.sh index 979bed9d934db..5a078fb87724a 100644 --- a/ci-operator/step-registry/observers/resource-watch/observers-resource-watch-commands.sh +++ b/ci-operator/step-registry/observers/resource-watch/observers-resource-watch-commands.sh @@ -73,7 +73,14 @@ then echo "using additional run-monitor args ${MONITOR_ARGS}" fi -openshift-tests run-resourcewatch > "${ARTIFACT_DIR}/run-resourcewatch.log" 2>&1 & -DISABLED_MONITOR_TESTS="apiserver-new-disruption-invariant,disruption-summary-serializer,incluster-disruption-serializer,pod-network-avalibility" -openshift-tests run-monitor ${MONITOR_ARGS:-} --artifact-dir $STORE_PATH --disable-monitor=${DISABLED_MONITOR_TESTS} > "${ARTIFACT_DIR}/run-monitor.log" 2>&1 & +EVENTS_FLAG="" +if [[ "${RESOURCE_EVENT_COLLECTION_ENABLED:-false}" == "true" ]]; then + EVENTS_FLAG="--enable-events" +fi +openshift-tests run-resourcewatch ${EVENTS_FLAG} > "${ARTIFACT_DIR}/run-resourcewatch.log" 2>&1 & + +if [[ "${RESOURCE_MONITOR_ENABLED:-false}" == "true" ]]; then + DISABLED_MONITOR_TESTS="apiserver-new-disruption-invariant,disruption-summary-serializer,incluster-disruption-serializer,pod-network-avalibility" + openshift-tests run-monitor ${MONITOR_ARGS:-} --artifact-dir $STORE_PATH --disable-monitor=${DISABLED_MONITOR_TESTS} > "${ARTIFACT_DIR}/run-monitor.log" 2>&1 & +fi wait diff --git a/ci-operator/step-registry/observers/resource-watch/observers-resource-watch-observer.yaml b/ci-operator/step-registry/observers/resource-watch/observers-resource-watch-observer.yaml index ecd1fef30a060..a5e55632dcd1a 100644 --- a/ci-operator/step-registry/observers/resource-watch/observers-resource-watch-observer.yaml +++ b/ci-operator/step-registry/observers/resource-watch/observers-resource-watch-observer.yaml @@ -12,6 +12,16 @@ observer: documentation: |- Set to "true" to enable the resource watch observer. When "false", the observer exits immediately without collecting any data. + - name: RESOURCE_MONITOR_ENABLED + default: "false" + documentation: |- + Set to "true" to enable the openshift-tests run-monitor process within the + resource watch observer. When "false", only run-resourcewatch is started. + - name: RESOURCE_EVENT_COLLECTION_ENABLED + default: "false" + documentation: |- + Set to "true" to enable event collection (events.k8s.io/v1) in + run-resourcewatch by passing the --enable-events flag. timeout: 24h grace_period: 1h documentation: |-