kubectl/pkg/cmd/apply
Manuel Grandeit c9b8fdf5d8 kubectl apply: fix --dry-run=client to show merged result
When a resource exists on the server, kubectl apply --dry-run=client
was outputting the unchanged server state instead of showing what
would result from applying the manifest.

Fix by computing the three-way merge patch (same as real apply) and
then applying it locally to the current server state.

Kubernetes-commit: aea05ad180edaffbb1f09b41b62d452779ed1da1
2025-11-29 20:15:36 +01:00
..
testdata/prune/simple Use standard *.kubernetes.io instead of *.k8s.io for ApplySet 2023-03-20 18:21:04 -04:00
apply.go kubectl apply: fix --dry-run=client to show merged result 2025-11-29 20:15:36 +01:00
apply_edit_last_applied.go Migrate genericclioptions.IOStreams usage to genericiooptions 2023-04-05 14:07:46 +03:00
apply_set_last_applied.go Migrate genericclioptions.IOStreams usage to genericiooptions 2023-04-05 14:07:46 +03:00
apply_test.go kubectl apply: fix --dry-run=client to show merged result 2025-11-29 20:15:36 +01:00
apply_view_last_applied.go Migrate genericclioptions.IOStreams usage to genericiooptions 2023-04-05 14:07:46 +03:00
applyset.go kubectl prune v2: switch to contains-group-kinds annotation 2023-06-28 11:27:00 -04:00
applyset_pruner.go kubectl prune v2: switch to contains-group-kinds annotation 2023-06-28 11:27:00 -04:00
patcher.go kubectl apply: fix --dry-run=client to show merged result 2025-11-29 20:15:36 +01:00
prune.go cleanup: replace deprecated sets.String 2023-03-01 09:05:59 -05:00