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

kustomize changing the yaml formatting #291

Closed
lswith opened this issue Aug 24, 2018 · 4 comments
Closed

kustomize changing the yaml formatting #291

lswith opened this issue Aug 24, 2018 · 4 comments

Comments

@lswith
Copy link
Contributor

lswith commented Aug 24, 2018

I've been using a specific yaml format for the kustomization.yaml files. It seems though that when I run the command kustomize edit set imagetag <imagetag> the file is reformatted. This is annoying when using gitops as its hard to see what's changed.

@Liujingfang1
Copy link
Contributor

What version of kustomize are you using? In v1.0.6, we added the feature of preserving the comments and orders in kustomization.yaml when edit is called.

@Liujingfang1
Copy link
Contributor

@lswith Do you still see this problem with the new version?

@lswith
Copy link
Contributor Author

lswith commented Sep 5, 2018

yep its working fine!

@lswith lswith closed this as completed Sep 5, 2018
@gabegorelick
Copy link

Comments and the order of top-level elements in kustomization.yaml seem to be preserved when running something like kustomize edit set image, but kustomize (as of v3.8.5) still reformats the file. For example it will change indentation and alphabetize properties under configMapGenerator, images, etc.

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

No branches or pull requests

3 participants