Open chrmarti opened 4 years ago
The same diff is shown with the "Apply" command.
Thanks. I'm guessing kubectl diff
uses some awareness of defaults and metadata of what can be skipped, whereas we do a kubectl get
and a naive VS Code diff. I'll take a look.
Docs are here: https://kubernetes.io/blog/2019/01/14/apiserver-dry-run-and-kubectl-diff/
We should do kubectl apply --dry-run
instead of just using the file-system.
I had this issue today, the naive diff is barely usable. Make use of Kubernetes diff is a must.
I suppose it should be simple to modify extension#diffKubernetesCore to make use of kubectl.invokeCommandThen(`diff -f ${fileUri}`, ...)
When I change the number of replicas, the
kubectl diff
shows that line and thegeneration
line as changed. When I run the extension's Diff command I get many more changes which seems unexpected and makes it hard to read: