azimuth-cloud / pyhelm3

Python client for interacting with Helm 3.
Apache License 2.0
42 stars 16 forks source link

"Error: invalid chart URL format" with helm chart from local disk #12

Open berti-peitz opened 2 months ago

berti-peitz commented 2 months ago

When loading & upgrading the chart this way:

chart = await client.get_chart(chart_ref='path/to/helm/chart')
revision = await client.install_or_upgrade_release(
        'release_name',
        chart,
        values,
        namespace='namespace'
    )

I get pyhelm3.errors.Error: Error: invalid chart URL format: 'path\to\helm\chart'

Problem are the apostrophes in the final shell_formatted_command-string (see command.py, line 185), which results from the conversion chart_ref-string --> WindowsPath --> str.

When adding shell_formatted_command = shell_formatted_command.replace('\'', '') after line 183 in command.py everything works as expected. Bild_2024-06-28_145950500

Maybe you can add this fix (or a similar one) to the library !?

joaquinCaceres commented 1 month ago

I'm using the library in 0.4.0 version and works well.

The only change is that I don't pass values to the function call. What does the variable "value" contain?