kapp icon indicating copy to clipboard operation
kapp copied to clipboard

server side dryRun should be used before apply

Open redbaron opened this issue 6 years ago • 3 comments

One of the problem with kubectl apply is that it can apply some resources before encountering problem with another.

Many of errors can be caught dryRun (https://kubernetes.io/blog/2019/01/14/apiserver-dry-run-and-kubectl-diff/) , which has an added benefit of invoking validating admission controllers.

kapp apply should make a single dryRun apply and if comes clean proceed to the actual apply.

redbaron avatar Oct 10 '19 12:10 redbaron

that sounds like a good idea. ill check it out shortly.

cppforlife avatar Oct 14 '19 17:10 cppforlife

We will need to make the value of a flag like this available as a part of :

  1. ResourceImplOpts So that we can pass the DryRun option to api-machinery for Create(), Update(), Patch() and Delete() API calls.
  2. AddOrUpdateChangeOpts So that kapp does not wait for changes to appear and does not attempt to do a Get() API call for the resource.

100mik avatar Oct 05 '21 05:10 100mik