Open exocode opened 1 year ago
/triage accepted
@ramessesii2: The label triage/accepted
cannot be applied. Only GitHub organization members can add the label.
I'd like to work on it if somebody could please assign it to me. cc @exocode
/triage accepted /kind bug
@ramessesii2 There is some comment-preservation related code in kyaml that you might find useful while you are trying to fix this. I believe there is literally a function you can use called CopyComments
somewhere. Please feel free to reach out if you need more help. You can also assign yourself the issue by leaving a comment /assign
.
/assign
Thanks @natasha41575, those are good pointers.
@ramessesii2 I've a hack code to tackle the issue at #5180. It would be great if you have any suggestions. :)
Thanks @wingyplus for the PR, I've been rather busy with my work.
/assign
Renamed the issue to clarify that kustomize edit fix
does currently preserve comments, as demonstrated by tests in kustomize/commands/internal/kustfile
. The command just doesn't preserve trailing comments.
This also happens when you have comments at the end of a line:
images:
- name: imageone
newName: registry.jfrog.io/docker/imageone # {"$imagepolicy": "platform-flux-tenant-config:imageone:name"}
newTag: craft-4-957db1b2-1689262100 # {"$imagepolicy": "platform-flux-tenant-config:imageone:tag"}
->
images:
- name: imageone
newName: registry.jfrog.io/docker/imageone
newTag: craft-4-957db1b2-1689262100
/assign
Hi @adzshaf, if you would like to take over this issue. I have a question that I cannot figure out in https://github.com/kubernetes-sigs/kustomize/pull/5180. Hope this could be help.
This issue has not been updated in over 1 year, and should be re-triaged.
You can:
/triage accepted
(org members only)/close
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-triage accepted
What happened?
running command
kustomize edit fix
changesto
What did you expect to happen?
it should keep comments untouched
How can we reproduce it (as minimally and precisely as possible)?
run
kustomize edit fix
Expected output
Actual output
Kustomize version
v5.0.1
Operating system
MacOS