From 8ce0b9ae9fe39526e4ed011b1e5868f95fa07ebd Mon Sep 17 00:00:00 2001 From: ci-bot Date: Fri, 8 Mar 2024 11:16:39 +0000 Subject: [PATCH] update ks-core helm chart --- .../files/extensions.customresourcefilters.rego | 10 ++++++++++ src/test/ks-core/templates/webhook.yaml | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/test/ks-core/files/extensions.customresourcefilters.rego b/src/test/ks-core/files/extensions.customresourcefilters.rego index cdd01b11..08e1be86 100644 --- a/src/test/ks-core/files/extensions.customresourcefilters.rego +++ b/src/test/ks-core/files/extensions.customresourcefilters.rego @@ -36,6 +36,11 @@ match if { installStatusMatch } +match if { + installStatusSearch + installedStatusMatch +} + match if { enabledStatusSearch enabledStatusMatch @@ -67,6 +72,11 @@ installStatusMatch if { lower(input.object.status.state) == lower(input.filter.value) } +installedStatusMatch if { + input.filter.value == "installed" + ["Installed","Enabled","Disabled"][_] == input.object.status.state +} + enabledStatusMatch if { input.filter.value == "true" == input.object.status.enabled } diff --git a/src/test/ks-core/templates/webhook.yaml b/src/test/ks-core/templates/webhook.yaml index 0fd1e180..0349452d 100644 --- a/src/test/ks-core/templates/webhook.yaml +++ b/src/test/ks-core/templates/webhook.yaml @@ -334,7 +334,10 @@ webhooks: failurePolicy: Ignore matchPolicy: Exact namespaceSelector: {} - objectSelector: {} + objectSelector: + matchExpressions: + - key: cluster-role.kubesphere.io/host + operator: DoesNotExist rules: - apiGroups: - cluster.kubesphere.io