Serializing PolicySpec includes `standards: null` and cannot be kubectl applied
foot opened this issue · 1 comments
Error from flux:
Policy/weave.policies.tenancy.dev-team-allowed-clusters dry-run failed, reason: Invalid, error: Policy.pac.weave.works "weave.policies.tenancy.dev-team-allowed-clusters" is invalid: [spec.standards: Invalid value: "null": spec.standards in body must be of type array: "null", spec.targets.labels: Invalid value: "null": spec.targets.labels in body must be of type array: "null"]
policy-agent/api/v2beta1/policy_types.go
Line 103 in 142a5c5
Should perhaps have omitempty
like the other optional fields?
Same for targets labels
Policy/weave.policies.tenancy.dev-team-allowed-clusters dry-run failed, reason: Invalid, error: Policy.pac.weave.works "weave.policies.tenancy.dev-team-allowed-clusters" is invalid: spec.targets.labels: Invalid value: "null": spec.targets.labels in body must be of type array: "null"
policy-agent/api/v2beta1/policy_types.go
Line 56 in 142a5c5