Open zagr0 opened 3 weeks ago
Thank you @zagr0 for pointing this out.
As you may see in the comments, I opened #748 to fix the issue. I test it in my own environments, but please let me know if you may test it as well.
Let's see if it can be reviewed soon.
Cheers!
Hi @askhari , thank you very much for your work! I have tested the PRs image and repository/tag replacement works as expected. For reformatting I noticed that it does not reorder keys in the values file anymore, but still empty lines are removed and indentaition for lists are changed.
Hi @zagr0,
Thank you for your feedback :).
For the reformatting there isn't a good solution afaik. It comes from how yaml.v2 marshall and unmarshall methods work. In yaml.v3, there is a different way to preserve order, but the removal of empty lines and indentation changes should remain. Usually for lists it changes the format when it's like this:
# original list
my_list:
- "first item"
- "second item"
# reformated list
my_list:
- "first item"
- "second item"
Is this the behaviour you see?
Cheers!
@askhari , yes, exactly for list indentation
in addition to empty lines removal I noticed the string values like "string"
replaced with string
but this is not very critical for us, thank you very much!
@zagr0 , thank you again for your feedback. I really appreciate it :).
All of these formatting changes comes from the serialization and deserialization of YAMLs (marshal and unmarshal). And then the content is writting into a file. There is not much we can do to avoid those changes using the default marshal and unmarshal methods. We may built a custom marshal/unmarshal, but I don't really know how to do it right now (a bit rookie in programming languages yet :D).
Cheers!
@zagr0 , now that PR #748 has been merged, I think these issues should be solved. If that's the case, could you please let me know if we may close this bug issue?
@zagr0 , I write this comment just as a reminder. Just in case we may close this issue :) .
Hi @askhari , yes, we can close it, thank you very much!
Describe the bug Image updater not able to find
tag
andrepository
withinimage
hierarchy to replace values, instead it adds new entriesimage.tag
andimage.repository
.Helm
values.yaml
file used:The commited result by image updater in git:
To Reproduce Steps to reproduce the behavior: Configure application with annotations to update image tag with helmvales:
with the
./helm/app/values.yaml
file content from example above.Expected behavior We expect to have updated tag and repo inside image section in
values.yaml
like:Version This is latest build from master, because we need the latest fixes for helmvalues git write-back