Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server side dryRun should be used before apply #43

Open
redbaron opened this issue Oct 10, 2019 · 3 comments
Open

server side dryRun should be used before apply #43

redbaron opened this issue Oct 10, 2019 · 3 comments
Assignees
Labels
discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution enhancement This issue is a feature request

Comments

@redbaron
Copy link
Contributor

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.

@cppforlife
Copy link
Contributor

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

@cppforlife cppforlife added discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution enhancement This issue is a feature request labels Oct 14, 2019
@cppforlife cppforlife added the good first issue An issue that will be a good candidate for a new contributor label Feb 12, 2020
@100mik
Copy link
Contributor

100mik commented Oct 5, 2021

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 100mik removed the good first issue An issue that will be a good candidate for a new contributor label Oct 7, 2021
@ringerc
Copy link

ringerc commented Aug 18, 2024

Take some care with this - I've seen situations where a dry-run will fail, but apply succeeds. Usually due to a prior incomplete or broken apply. It'll be important to support a flag to skip the dry-run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution enhancement This issue is a feature request
Projects
Status: To Triage
Development

No branches or pull requests

4 participants