From 38fed76b240b3ebbfd637eb664e32188ec54c768 Mon Sep 17 00:00:00 2001 From: Manuel Hutter Date: Thu, 3 Nov 2022 14:35:44 +0100 Subject: [PATCH] Don't include operator namespaces in user workload monitoring Signed-off-by: Manuel Hutter --- component/main.jsonnet | 2 ++ jsonnetfile.json | 14 ++++++++++++++ .../openshift-operators-redhat.yaml | 1 + .../openshift4-operators/openshift-operators.yaml | 1 + 4 files changed, 18 insertions(+) create mode 100644 jsonnetfile.json diff --git a/component/main.jsonnet b/component/main.jsonnet index cd29537..94d8903 100644 --- a/component/main.jsonnet +++ b/component/main.jsonnet @@ -18,6 +18,8 @@ local namespace = operatorlib.validateInstance(params.namespace); // namespace openshift-operators-redhat 'openshift.io/cluster-monitoring': '%s' % [ namespace == 'openshift-operators-redhat' ], + // ignore namespace by user-workload monitoring + 'openshift.io/user-monitoring': 'false', }, }, }, diff --git a/jsonnetfile.json b/jsonnetfile.json new file mode 100644 index 0000000..b3abc0c --- /dev/null +++ b/jsonnetfile.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "dependencies": [ + { + "source": { + "git": { + "remote": "https://github.com/bitnami-labs/kube-libsonnet" + } + }, + "version": "v1.19.0" + } + ], + "legacyImports": true +} diff --git a/tests/golden/openshift-operators-redhat/openshift-operators-redhat/openshift4-operators/openshift-operators-redhat.yaml b/tests/golden/openshift-operators-redhat/openshift-operators-redhat/openshift4-operators/openshift-operators-redhat.yaml index 9de9f10..6b8a72d 100644 --- a/tests/golden/openshift-operators-redhat/openshift-operators-redhat/openshift4-operators/openshift-operators-redhat.yaml +++ b/tests/golden/openshift-operators-redhat/openshift-operators-redhat/openshift4-operators/openshift-operators-redhat.yaml @@ -6,6 +6,7 @@ metadata: labels: name: openshift-operators-redhat openshift.io/cluster-monitoring: 'true' + openshift.io/user-monitoring: 'false' name: openshift-operators-redhat --- apiVersion: operators.coreos.com/v1 diff --git a/tests/golden/openshift-operators/openshift-operators/openshift4-operators/openshift-operators.yaml b/tests/golden/openshift-operators/openshift-operators/openshift4-operators/openshift-operators.yaml index 5018354..e9d0e39 100644 --- a/tests/golden/openshift-operators/openshift-operators/openshift4-operators/openshift-operators.yaml +++ b/tests/golden/openshift-operators/openshift-operators/openshift4-operators/openshift-operators.yaml @@ -6,6 +6,7 @@ metadata: labels: name: openshift-operators openshift.io/cluster-monitoring: 'false' + openshift.io/user-monitoring: 'false' name: openshift-operators --- apiVersion: operators.coreos.com/v1