Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit d04cc02

Browse files
committed
exclude openshift namespaces via regex
Signed-off-by: Zahar Pecherichny <[email protected]>
1 parent a0351d2 commit d04cc02

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

charts/hnc/values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ image:
22
repository: gcr.io/k8s-staging-multitenancy/hnc-manager
33
tag: v1.1.0
44
imagePullPolicy: {}
5+
# Regex of namespaces for HNC to manage
6+
# example include everything except openshift.*
7+
#hncIncludeNamespacesRegex: ([^o].*|o([^p].*)|op([^e].*)|ope([^n].*)|open([^s].*)|opens([^h].*)|opensh([^i].*)|openshi([^f].*)|openshif([^t].*))
8+
hncIncludeNamespacesRegex: ""
59
# A list of namespaces to add the HNC exclude label to
610
hncExcludeNamespaces:
711
- hnc-system

hack/helm_patches/update-helm.sh

+3
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ for output_file in ${TEMPLATESDIR}/*.yaml; do
176176
# Add placeholder for --excluded-namespace arg
177177
sed -i -e '/args:/a \ {{- range $hncExcludeNamespace := .Values.hncExcludeNamespaces}}\n \ - --excluded-namespace={{ $hncExcludeNamespace }}\n \ {{- end }}' $output_file
178178

179+
# Add placeholder for --included-namespace-regex arg
180+
sed -i -e '/args:/a \ {{- if $hncIncludeNamespacesRegex}}\n \ - --included-namespace-regex={{ $hncIncludeNamespacesRegex }}\n \ {{- end }}' $output_file
181+
179182
# [HRQ] Add conditional blocks for --enable-hrq arg
180183
sed -i -e '/args:/a \ {{- if .Values.hrq.enabled }}\n \ - --enable-hrq\n \ {{- end }}' $output_file
181184

0 commit comments

Comments
 (0)