Skip to content

Commit 6704fbe

Browse files
committed
Update default regex for excluded namespaces in network policies and refine jqfilter in rate limit rule
Change the default value of 'var_network_policies_namespaces_exempt_regex' to match namespaces starting with 'kube-' or 'openshift-'. Additionally, modify the jqfilter in 'rule.yml' to utilize the updated regex for improved namespace exclusion in rate limit checks.
1 parent 0580e28 commit 6704fbe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

applications/openshift/networking/routes_rate_limit/rule.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ references:
1919
nist: SC-5,SC-5(1),SC-5(2)
2020
srg: SRG-APP-000246-CTR-000605,SRG-APP-000435-CTR-001070
2121

22-
{{% set jqfilter = '[.items[] | select(.metadata.namespace | startswith("kube-") or startswith("openshift-") | not) | select(.metadata.namespace | test("{{.var_routes_excluded_namespaces_regex}}"; "") | not) | select(.metadata.annotations["haproxy.router.openshift.io/rate-limit-connections"] == "true" | not) | .metadata.name]' %}}
22+
{{% set jqfilter = '[.items[] | select(.metadata.namespace | test("{{.var_routes_excluded_namespaces_regex}}"; "") | not) | select(.metadata.annotations["haproxy.router.openshift.io/rate-limit-connections"] == "true" | not) | .metadata.name]' %}}
2323

2424
ocil_clause: 'Rate limit is not enabled for all routes outside the excluded namespaces'
2525

applications/openshift/networking/var_routes_excluded_namespaces_regex.var

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ operator: equals
1515
interactive: false
1616

1717
options:
18-
default: "None"
18+
default: "^kube-.*|openshift-.*"

0 commit comments

Comments
 (0)