Skip to content

Commit 2cf276f

Browse files
committed
Enable UWM in OpenShift test clusters
1 parent db75f32 commit 2cf276f

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This ConfigMap enables User Workload Monitoring in OpenShift clusters.
2+
# See https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/monitoring/configuring-user-workload-monitoring#enabling-monitoring-for-user-defined-projects_preparing-to-configure-the-monitoring-stack-uwm.
3+
apiVersion: v1
4+
kind: ConfigMap
5+
metadata:
6+
name: cluster-monitoring-config
7+
namespace: openshift-monitoring
8+
data:
9+
config.yaml: |
10+
enableUserWorkload: true

hack/.ci/run-e2e-openshift-aws-release.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ export SO_NODECONFIG_PATH
3636
SO_DISABLE_PROMETHEUS_OPERATOR="${SO_DISABLE_PROMETHEUS_OPERATOR:-true}"
3737
export SO_DISABLE_PROMETHEUS_OPERATOR
3838

39+
SO_ENABLE_OPENSHIFT_USER_WORKLOAD_MONITORING="${SO_ENABLE_OPENSHIFT_USER_WORKLOAD_MONITORING:-true}"
40+
export SO_ENABLE_OPENSHIFT_USER_WORKLOAD_MONITORING
41+
3942
run-deploy-script-in-all-clusters "${parent_dir}/../ci-deploy-release.sh"
4043

4144
apply-e2e-workarounds-in-all-clusters

hack/.ci/run-e2e-openshift-aws.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ export SO_CSI_DRIVER_PATH
3939
SO_DISABLE_PROMETHEUS_OPERATOR="${SO_DISABLE_PROMETHEUS_OPERATOR:-true}"
4040
export SO_DISABLE_PROMETHEUS_OPERATOR
4141

42+
SO_ENABLE_OPENSHIFT_USER_WORKLOAD_MONITORING="${SO_ENABLE_OPENSHIFT_USER_WORKLOAD_MONITORING:-true}"
43+
export SO_ENABLE_OPENSHIFT_USER_WORKLOAD_MONITORING
44+
4245
run-deploy-script-in-all-clusters "${parent_dir}/../ci-deploy.sh"
4346

4447
apply-e2e-workarounds-in-all-clusters

hack/ci-deploy-release.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ else
5858
kubectl_create -n=prometheus-operator -f="${source_url}/${revision}/examples/third-party/prometheus-operator.yaml"
5959
fi
6060

61+
if [[ "${SO_ENABLE_OPENSHIFT_USER_WORKLOAD_MONITORING:-}" == "true" ]]; then
62+
echo "Enabling OpenShift User Workload Monitoring"
63+
kubectl_create -f="${source_url}/${revision}/hack/.ci/manifests/namespaces/openshift-monitoring/openshift-uwm.cm.yaml"
64+
else
65+
echo "Skipping enabling OpenShift User Workload Monitoring"
66+
fi
67+
6168
kubectl_create -n=haproxy-ingress -f="${source_url}/${revision}/examples/third-party/haproxy-ingress.yaml"
6269

6370
kubectl_create -f="${source_url}/${revision}/examples/third-party/cert-manager.yaml"

hack/ci-deploy.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ else
4242
cp ./examples/third-party/prometheus-operator/*.yaml "${ARTIFACTS_DEPLOY_DIR}/prometheus-operator"
4343
fi
4444

45+
if [[ "${SO_ENABLE_OPENSHIFT_USER_WORKLOAD_MONITORING:-}" == "true" ]]; then
46+
echo "Enabling OpenShift User Workload Monitoring"
47+
cp ./hack/.ci/manifests/namespaces/openshift-monitoring/openshift-uwm.cm.yaml "${ARTIFACTS_DEPLOY_DIR}/"
48+
else
49+
echo "Skipping enabling OpenShift User Workload Monitoring"
50+
fi
51+
4552
cp ./deploy/operator/*.yaml "${ARTIFACTS_DEPLOY_DIR}/operator"
4653
cp ./examples/third-party/haproxy-ingress/*.yaml "${ARTIFACTS_DEPLOY_DIR}/haproxy-ingress"
4754
cp ./examples/third-party/cert-manager.yaml "${ARTIFACTS_DEPLOY_DIR}/"

0 commit comments

Comments
 (0)