Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serializing PolicySpec includes standards: null and cannot be kubectl applied #68

Open
foot opened this issue Aug 19, 2022 · 1 comment

Comments

@foot
Copy link

foot commented Aug 19, 2022

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
Copy link
Author

foot commented Aug 19, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant