-
Notifications
You must be signed in to change notification settings - Fork 826
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What steps did you take and what happened:
I want to exclude namespaces with selectors. One of the selectors has the value "true"
When configuring a value with a boolean, the template fails, as it writes the value without quotes.
Using the following values with the chart:
validatingWebhookExemptNamespacesLabels:
example.com/exclude:
- "string"
example.com/exclude:
- "true"Results in:
namespaceSelector:
matchExpressions:
- key: admission.gatekeeper.sh/ignore
operator: DoesNotExist
- key: kubernetes.io/metadata.name
operator: NotIn
values:
- gatekeeper
- key: example.com/exclude
operator: NotIn
values:
- true
- key: example.com/exclude
operator: NotIn
values:
- stringWhat did you expect to happen:
I expected the values to be a list of strings.
namespaceSelector:
matchExpressions:
- key: admission.gatekeeper.sh/ignore
operator: DoesNotExist
- key: kubernetes.io/metadata.name
operator: NotIn
values:
- gatekeeper
- key: example.com/exclude
operator: NotIn
values:
- "true"
- key: example.com/exclude
operator: NotIn
values:
- "string"Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
By quoting the value in the template, the issue seems to be resolved.
Environment:
- Gatekeeper version:
- Kubernetes version: (use
kubectl version):
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working