pulumi-kubernetes icon indicating copy to clipboard operation
pulumi-kubernetes copied to clipboard

Incorrect Release example - value_yaml_files should be a sequence

Open magick93 opened this issue 2 years ago • 3 comments

Hello!

  • Vote on this issue by adding a 👍 reaction
  • To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already)

Issue details

The following is not reading the local values file for a helm chart:

wordpress = Release(
    "wordpress",
    ReleaseArgs(
        chart="wordpress",
        repository_opts=RepositoryOptsArgs(
            repo="https://charts.bitnami.com/bitnami",
        ),
        value_yaml_files=pulumi.FileAsset("./wordpress-values.yaml"),

    ),
)

Steps to reproduce

  1. Try the above code snippet

Expected: Expect the values in the values file are applied to the helm deploymennt Actual: values file appears to be unread.

magick93 avatar Mar 08 '22 22:03 magick93

I think you want to specify the value_yaml_files as a sequence: [pulumi.FileAsset("./wordpress-values.yml")]. Not entirely sure why this didn't cause a warning for you earlier though.

viveklak avatar Mar 10 '22 22:03 viveklak

See https://github.com/pulumi/pulumi-kubernetes/blob/07bf517e59859739ea259802a337468cb01add29/sdk/python/pulumi_kubernetes/helm/v3/Release.py#L705-L722

Interesting, I tried specifying the file path either prefixed with ./, or not, and also absolute. Never received any errors - yet they cant all have been correct.

magick93 avatar Mar 11 '22 01:03 magick93

Ah the example needs to be updated - sorry about that. I am not entirely sure how the python sdk managed to escape the obvious error here...

viveklak avatar Mar 11 '22 05:03 viveklak