You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this plugin to bump a chart version, and event though it works as intended, it removes all comments that I have in the chart. Is there any way to prevent this?
Original file:
apiVersion: v2name: testchartdescription: A Helm chart for Kubernetes# A chart can be either an 'application' or a 'library' chart.## Application charts are a collection of templates that can be packaged into versioned archives# to be deployed.## Library charts provide useful utilities or functions for the chart developer. They're included as# a dependency of application charts to inject those utilities and functions into the rendering# pipeline. Library charts do not define any templates and therefore cannot be deployed.type: application# This is the chart version. This version number should be incremented each time you make changes# to the chart and its templates, including the app version.# Versions are expected to follow Semantic Versioning (https://semver.org/)version: 0.1.0# This is the version number of the application being deployed. This version number should be# incremented each time you make changes to the application. Versions are not expected to# follow Semantic Versioning. They should reflect the version the application is using.appVersion: 1.16.0
Modified file after plugin is executed:
apiVersion: v2appVersion: 1.16.0description: A Helm chart for Kubernetesname: testcharttype: applicationversion: 0.1.1
Thank you!
The text was updated successfully, but these errors were encountered:
To change the version of a Chart, this CLI parses the Chart.yml file, changes the value of its "version" key, then re-writes the Chart.yml file back to disk, and leverages the https://github.com/krishicks/yaml-patch library to do so.
That library doesn't keep the comments in its internal representation of the read YAML document, and at the time, I didn't find any go yaml parser implementation that would. Now, it appears that https://github.com/go-yaml/yaml/tree/v3 supports YAML comments.
I will give the migration a go, but I cannot commit on a deadline since i do not use Helm these days. I am happy to accept a PR though :)
In the meantime, one can use a combination of the two following CLIs to achieve results similar to this one, while preserving comments:
Hi,
I'm using this plugin to bump a chart version, and event though it works as intended, it removes all comments that I have in the chart. Is there any way to prevent this?
Original file:
Modified file after plugin is executed:
Thank you!
The text was updated successfully, but these errors were encountered: