-
Notifications
You must be signed in to change notification settings - Fork 7
Add Chart image baking #104
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Tim Ramlot <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
5b160f6 to
1e5e33b
Compare
|
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
| "os" | ||
| "strings" | ||
|
|
||
| "gopkg.in/yaml.v3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could replace gopkg.in/yaml.v3 with goccy/go-yaml package, which supports keeping comments and empty newlines, e.g.,
✦ $ ycat /dev/stdin <<EOF
foo: bar
# A comment
bar:foo
# Some extraneous newlines that should be kept as-is
# end of file
EOF
1 | foo: bar
2 |
3 | # A comment
4 | bar:foo
5 |
6 | # Some extraneous newlines that should be kept as-is
7 |
8 |
9 |
10 | # end of file
11 |Note that we will need to decode YAML into an AST instead of decoding it to a Go struct (otherwise, we will lose the comments and newlines and such). Goccy probably has helper funcs to modify the AST, then we can encode it back to YAML.
Adds
helm-tool images extract values.yaml -p paths.jsonandhelm-tool images bake chart.tgz -p paths.jsoncommands.These commands can be used to "bake" the
_defaultReferencevalues, adding digests for tag-only image references.TODO: make sure YAML comments are preserved.