v3.0.1 fixes false drift from the default client drift engine in kubectl_manifest (#401, #402). It's a drop-in upgrade from 3.0.0.
Fixes
- A key with no value no longer drifts forever. A bare
annotations:(YAMLnull) used to show drift on every plan against an object whose only annotation iskubectl.kubernetes.io/last-applied-configuration. Anullnow counts as absent wherever the apply leaves the live content alone. Anullthat the apply would act on still shows as drift, askubectl diffshows it. One example islabels:on a built-in kind, where the apply deletes the live labels. The exact rules, including custom resources, Namespaces, Secrets andserver_side_apply, are in the drift docs. - Resource quantities match the form the apiserver stores.
cpu: 1now matches the stored"1",cpu: 0.5matches"500m"and"1024Mi"matches"1Gi". This covers quantity maps such asrequests,limitsandhard, plusemptyDir.sizeLimitandresourceFieldRef.divisor, in the core,apps,batchandnode.k8s.ioAPI groups. Custom resources are still compared exactly. Usedrift_engine = "server"if a CRD's quantities drift. driftis recomputed whenserver_side_applyorfield_managerchanges, so changing either no longer fails the apply with an inconsistent result.
Other changes
- The
ignore_fieldsdocs now say plainly that ignored paths are still sent on apply and overwrite changes made by other tools. They also list the alternatives (#380). - Built with Go 1.27 and Kubernetes client libraries v0.37.2.