weaveworks/policy-agent

Serializing PolicySpec includes `standards: null` and cannot be kubectl applied

foot opened this issue · 1 comments

foot commented

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"]

Standards []PolicyStandard `json:"standards"`

Should perhaps have omitempty like the other optional fields?

foot commented

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"

Labels []map[string]string `json:"labels"`