Skip to content

Commit

Permalink
exclude openshift namespaces via regex
Browse files Browse the repository at this point in the history
Signed-off-by: Zahar Pecherichny <[email protected]>
  • Loading branch information
zfrhv committed Jun 10, 2024
1 parent a0351d2 commit d04cc02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/hnc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ image:
repository: gcr.io/k8s-staging-multitenancy/hnc-manager
tag: v1.1.0
imagePullPolicy: {}
# Regex of namespaces for HNC to manage
# example include everything except openshift.*
#hncIncludeNamespacesRegex: ([^o].*|o([^p].*)|op([^e].*)|ope([^n].*)|open([^s].*)|opens([^h].*)|opensh([^i].*)|openshi([^f].*)|openshif([^t].*))
hncIncludeNamespacesRegex: ""
# A list of namespaces to add the HNC exclude label to
hncExcludeNamespaces:
- hnc-system
Expand Down
3 changes: 3 additions & 0 deletions hack/helm_patches/update-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ for output_file in ${TEMPLATESDIR}/*.yaml; do
# Add placeholder for --excluded-namespace arg
sed -i -e '/args:/a \ {{- range $hncExcludeNamespace := .Values.hncExcludeNamespaces}}\n \ - --excluded-namespace={{ $hncExcludeNamespace }}\n \ {{- end }}' $output_file

# Add placeholder for --included-namespace-regex arg
sed -i -e '/args:/a \ {{- if $hncIncludeNamespacesRegex}}\n \ - --included-namespace-regex={{ $hncIncludeNamespacesRegex }}\n \ {{- end }}' $output_file

# [HRQ] Add conditional blocks for --enable-hrq arg
sed -i -e '/args:/a \ {{- if .Values.hrq.enabled }}\n \ - --enable-hrq\n \ {{- end }}' $output_file

Expand Down

0 comments on commit d04cc02

Please sign in to comment.