pepr
pepr copied to clipboard
Look Into Allowing Regex in InNamespace
Is your feature request related to a problem? Please describe.
For uds-core policy exemptions, there might be a case for optionally locking down which namespace the operator watches for Exemption CRs. With the current implementation of .InNamespace()
, it does not look to be possible to set it to a single namespace or list / all namespaces based on env var. (e.g. .InNamespace(process.env.EXEMPTION_NS)
)
Describe the solution you'd like
- Given an admin wants the option to allow single or all namespaces in
.InNamespace()
, or maybe namespaces that fit a pattern - he or she could use a regex patterns like so
.InNamspace(".*")
,.InNamespace("uds-policy-exemptions")
,.InNamespace("*-policy-exemptions")
Describe alternatives you've considered
The alternative is to do this as the module author in the validator and not use .InNamespace()
.