Adding storage to the chart from CLI

mm0nst3r

Dabbler
Joined
Sep 5, 2021
Messages
33
Is it possible to add mount points to the chart from CLI rather than from GUI?
I have a shit-ton of datasets and want to add them all to several charts. Adding them all trough GUI is very time consuming and repeating.
 

HarryMuscle

Contributor
Joined
Nov 15, 2021
Messages
161
Yes. You can setup the whole application from the command line. I'll try to post an example tomorrow when I'm at my computer. Basically you're using the chart.release.create API via the midclt tool.

Thanks,
Harry
 

mm0nst3r

Dabbler
Joined
Sep 5, 2021
Messages
33
I will be most grateful! Especially I would like to know how to edit the existing chart – to be able copy-paste the most repeating parts of the config!
 

waqarahmed

iXsystems
iXsystems
Joined
Aug 28, 2019
Messages
136
@mm0nst3r you can do it with the following command :)
midclt call -job chart.release.update APPNAMEHERE '{"values": {"hostPathVolumes": [{"hostPath": "/mnt/pool/test_dir", "mountPath": "/test_dir", "readOnly": true}]}}'
 

mm0nst3r

Dabbler
Joined
Sep 5, 2021
Messages
33
Thank you - how would it look with several paths to add? Like:

midclt call -job chart.release.update APPNAMEHERE '{"values": {"hostPathVolumes": [{"hostPath": "/mnt/pool/test_dir", "mountPath": "/test_dir", "readOnly": true}], [{"hostPath": "/mnt/pool/test2_dir", "mountPath": "/test2_dir", "readOnly": true}],[{"hostPath": "/mnt/pool/test3_dir", "mountPath": "/test3_dir", "readOnly": true}]}}'

?
 
Last edited:

waqarahmed

iXsystems
iXsystems
Joined
Aug 28, 2019
Messages
136
@mm0nst3r at a quick glance, it looks good. Let me know otherwise please, thanks!
( to clarify, this is only applicable for apps deployed with Launch Docker Image button - each app defines it's own schema, so if you are looking to add/change paths for some different app - please make sure you conform to it's schema standards )
 

mm0nst3r

Dabbler
Joined
Sep 5, 2021
Messages
33
As you said it works fine for plain docker images, but didn't work for Double Commanded from Truechart, so I just did it all through GUI eventually.
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
As you said it works fine for plain docker images, but didn't work for Double Commanded from Truechart, so I just did it all through GUI eventually.

Our Helm structure is available on the website.
But we highly advice you to just use the GUI or native Helm.
 
Top