Commit Graph

7 Commits

Author SHA1 Message Date
Daniel Lenar 5c8d4bb380 Use label selector for filtering out resources when pruning.
Matches same behavior as for kubectl apply

Signed-off-by: Daniel Lenar <dlenar@vailsys.com>

Kubernetes-commit: d53af227870a8e4434a0bf2f58770ec4dbec241f
2023-01-05 13:55:39 -06:00
Paco Xu 89470f4910 kubectl apply: warning that in future release, prune will ignores no-namespaced resource if -n is not empty
Signed-off-by: Paco Xu <paco.xu@daocloud.io>

Kubernetes-commit: f3b49adadf2182ba0a7fb930e6340da725053520
2022-11-09 07:43:03 +08:00
Arda Güçlü ab3928acd9 Refactor diff/prune
This PR does some refactors for diff/prune;

- GetRESTMappings takes value array instead reference
- Move getObjectName into diff instead prune
- License, etc. changes

Kubernetes-commit: 6c449dd272c95f2aeb3bb77e67d312d8df21bd62
2021-11-08 11:22:10 +03:00
Arda Güçlü 2d0f4303f1 Get object name correctly for pruned resources
Kubernetes-commit: a19bd5e47436c1f0a2aea20c4a992da18f8ba480
2021-10-06 17:01:19 +03:00
Arda Güçlü 292510bc0b Add pruner constructor, tweak DiffOptions
Kubernetes-commit: 05100c0e49328cd149e96aa78fefc91c8c97ffee
2021-09-30 11:26:40 +03:00
Arda Güçlü 3f914a34f1 Add new unit tests for diff/prune
Kubernetes-commit: 17de414905fb3463ec17ec63f40180fa09965d98
2021-09-24 09:40:26 +03:00
Arda Güçlü ff5d018049 Introduce new prune parameter into diff command
This PR introduces new prune and it's dependent parameters to simulate
`kubectl apply --prune` command.

Kubernetes-commit: 56c19f1056ad6d4a4bb926fe90e37f56a31c4e2f
2021-09-17 15:27:21 +03:00