Closed serngawy closed 1 year ago
Kudos, SonarCloud Quality Gate passed!
@serngawy Thanks for the PR, but providing a MatchExpression direcly is already implemented in:
We did it this way using map[string]interface{}
so that the old way (providing key: value
pairs) would still be supported and it wouldn't be a breaking change.
Please try what you'd like to using a new version of the generator and let us know if there are gaps.
/hold
@dhaiducek Would you give example how to do it, I'm looking to have Value NotIn expression ?
It looks like there's a bug with the way we're handling the deprecated placement.clusterSelectors
. It works to have a PolicyGenerator manifest with:
policyDefaults:
namespace: policies
placement:
clusterSelectors:
matchExpressions:
- key: cloud
operator: NotIn
values:
- red hat
Result:
spec:
clusterSelector:
matchExpressions:
- key: cloud
operator: NotIn
values:
- red hat
But using clusterSelector
results in an empty array:
spec:
clusterSelector:
matchExpressions: []
I'll work on a fix.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: serngawy Once this PR has been reviewed and has the lgtm label, please assign willkutler for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.