helm-release-plugin icon indicating copy to clipboard operation
helm-release-plugin copied to clipboard

Add abiltiy to edit vlaues

Open rtpro opened this issue 2 years ago • 0 comments

Add the ability to edit existing helm release values in a text editor.

Command example

helm release values edit <RELEASE NAME>

The command Opens a text editor with the current release values. The values are applied after the changes are saved.


Design


# Create tmp file 
TMPFILE=$(mktemp)

# get values to 
helm  get values <RELEASE> > $(echo $TMPFILE)

# Remove strings "USER-SUPPLIED VALUES:"
sed -i '/USER-SUPPLIED VALUES:/d' $TMPFILE

# Open default text editor 
"${EDITOR:-vi}" $TMPFILE

# Apply values 
helm release upgrade <RELEASE> --values $TMPFILE

# Delete tmp file 
rm -f $TMPFILE

rtpro avatar Aug 27 '22 14:08 rtpro