1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-05 15:37:19 +00:00
kyverno/definitions
Michael Barrientos b067f41d02
Replace Policy CRD AnyValue fields with empty dict (#1086)
/kind cleanup

\## Proposed change

This implements the same change as #1047, except for the new Policy CRD instead of the ClusterPolicy CRD, which apparently did not get those updates before merging.

When deploying Kyverno using Argo CD, we get a persistent false diff for the Policy custom resource definition (the definition itself, not instances of Policy), because Kubernetes converts the invalid AnyValue: {} property types to just an empty dict {}. Since the Kubernetes server makes this change to {} unilaterally after applying, when a diffing tool like Argo CD compares it against the YAML manifest, each such instance of AnyValue appears as a diff.

I know that since AnyValue is not part of the official OpenAPI V3 schema, and that when you run kubectl get crd policies.kyverno.io -o yaml the status message shows Kubernetes complaining about "Required value: must not be empty for specified object fields" for all of these fields. In theory the correct solution would be to somehow provide a full schema, but I know this can be tricky for these data/anyPattern/patches types, but at the minimum, I would like to get Argo CD to believe that there are no changes that need to be applied.

Since these fields are already silently turned into {} by Kubernetes, this should have no functionality change on existing code/deployments.
2020-08-26 11:11:36 -07:00
..
crds Replace Policy CRD AnyValue fields with empty dict (#1086) 2020-08-26 11:11:36 -07:00
debug configrable rules added (#1017) 2020-08-07 17:09:24 -07:00
github e2e workflow added (#1021) 2020-08-06 11:56:31 +05:30
k8s-resource add watch policy to clusterrole kyverno:customresources (#1084) 2020-08-24 12:27:16 -07:00
manifest Add go fmt (#1055) 2020-08-14 12:21:06 -07:00
release Replace Policy CRD AnyValue fields with empty dict (#1086) 2020-08-26 11:11:36 -07:00
install.yaml Replace Policy CRD AnyValue fields with empty dict (#1086) 2020-08-26 11:11:36 -07:00
install_debug.yaml Replace Policy CRD AnyValue fields with empty dict (#1086) 2020-08-26 11:11:36 -07:00
kustomization.yaml tag v1.1.10 2020-08-21 11:12:55 -07:00