open-policy-agent / gatekeeper

🐊 Gatekeeper - Policy Controller for Kubernetes
https://open-policy-agent.github.io/gatekeeper/
Apache License 2.0
3.72k stars 765 forks source link

controllerManager.networkPolicy.ingress: Uses a dict instead of list in values.yaml #3651

Closed eric-as closed 1 month ago

eric-as commented 1 month ago

What steps did you take and what happened:

I use the Gatekeeper Helm Chart with a set of ingress rules in controllerManager.networkPolicy.ingress. When I do a Helm release, this error message occurs: coalesce.go:286: warning: cannot overwrite table with non table for gatekeeper.gatekeeper.controllerManager.networkPolicy.ingress (map[]) It seems, that the ingress rules are applied correctly (checked via k describe networkpolicies.networking.k8s.io gatekeeper-controller-manager).

What did you expect to happen:

The type of the object controllerManager.networkPolicy.ingress in the values.yaml should be changed from dict to list, so it looks like this: ingress: []

Anything else you would like to add:

The semantics of network policies in the template expects a set of list items. The example also shows to use a list. I fixed this in a local copy of this chart and the error was not raised.

Environment:

eric-as commented 1 month ago

As I can see: There already is a commit fixing that issue.