github alekc/terraform-provider-kubectl v3.0.1

4 hours ago

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: (YAML null) used to show drift on every plan against an object whose only annotation is kubectl.kubernetes.io/last-applied-configuration. A null now counts as absent wherever the apply leaves the live content alone. A null that the apply would act on still shows as drift, as kubectl diff shows it. One example is labels: on a built-in kind, where the apply deletes the live labels. The exact rules, including custom resources, Namespaces, Secrets and server_side_apply, are in the drift docs.
  • Resource quantities match the form the apiserver stores. cpu: 1 now matches the stored "1", cpu: 0.5 matches "500m" and "1024Mi" matches "1Gi". This covers quantity maps such as requests, limits and hard, plus emptyDir.sizeLimit and resourceFieldRef.divisor, in the core, apps, batch and node.k8s.io API groups. Custom resources are still compared exactly. Use drift_engine = "server" if a CRD's quantities drift.
  • drift is recomputed when server_side_apply or field_manager changes, so changing either no longer fails the apply with an inconsistent result.

Other changes

  • The ignore_fields docs 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.

Don't miss a new terraform-provider-kubectl release

NewReleases is sending notifications on new releases.