Skip to content

Conversation

@inteon
Copy link
Member

@inteon inteon commented May 12, 2025

Adds helm-tool images extract values.yaml -p paths.json and helm-tool images bake chart.tgz -p paths.json commands.

These commands can be used to "bake" the _defaultReference values, adding digests for tag-only image references.

TODO: make sure YAML comments are preserved.

Signed-off-by: Tim Ramlot <[email protected]>
@cert-manager-prow cert-manager-prow bot added the dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. label May 12, 2025
@cert-manager-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign inteon for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 12, 2025
@cert-manager-prow cert-manager-prow bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 12, 2025
@inteon inteon force-pushed the image_baking branch 2 times, most recently from 5b160f6 to 1e5e33b Compare May 12, 2025 20:04
@cert-manager-prow cert-manager-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 12, 2025
@cert-manager-prow
Copy link
Contributor

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.

@cert-manager-prow cert-manager-prow bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 26, 2025
"os"
"strings"

"gopkg.in/yaml.v3"
Copy link
Member

@maelvls maelvls Sep 1, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants