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

Support a diff-strategy of "none" for "tk apply" to suppress diffing. #700

Merged
merged 1 commit into from
May 18, 2022

Conversation

jphx
Copy link
Contributor

@jphx jphx commented May 4, 2022

This pull request adds a diff strategy of none for tk apply that completely suppresses diffing before the apply operation.

The reason I'm submitting this is that I'm using Tanka to create a very large set of Kubernetes resources and it takes 5 to 10 minutes to perform the diff operation before getting to the apply stage. Since I often use a tk diff myself first, before the tk apply, I don't need the diff that's part of apply in some cases. Also, when our automated job runs to do a tk apply, it uses the --dangerous-auto-approve option, with no human present observe the diff output. The 5 to 10 minute delay in this step of the automation makes the automation job run longer than desired, delaying the deployment of the things that come after this step.

I would like to change some documentation to describe the none option to tk apply, but I don't see any good place to put that. Any suggestion would be welcome.

@jphx
Copy link
Contributor Author

jphx commented May 16, 2022

Would it be possible to get a review of this? It would be a useful enhancement for developers dealing with similar issues as myself.

@RealityAnomaly
Copy link

Would be great to have this in, I'm doing the same thing.

Copy link
Member

@julienduchesne julienduchesne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@julienduchesne julienduchesne merged commit f0cb798 into grafana:main May 18, 2022
@jphx jphx deleted the suppress-diff branch May 18, 2022 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants