pulumi / pulumi-kubernetes

A Pulumi resource provider for Kubernetes to manage API resources and workloads in running clusters
https://www.pulumi.com/docs/reference/clouds/kubernetes/
Apache License 2.0
410 stars 117 forks source link

`postrender` not working #2036

Closed yellowhat closed 11 months ago

yellowhat commented 2 years ago

What happened?

Hi, I would like to use the postrender argument for kubernetes.helm.v3.Release:

kubernetes.helm.v3.Release(
    "core",
    name="test",
...
    postrender="/tmp/z.sh"
)

where:

$ cat /tmp/z.sh
#!/usr/bin/env bash
cat <&0 >/tmp/z.out

I do not get any error during pulumi preview but the /tmp/z.out file is not created.

I have noticed that the postrender argument for the terraform-helm-provider has 2 inputs:

In fact using:

resource "helm_release" "resource-name" {
  ....
  postrender{
    binary_path = "/tmp/z.out"
  }
  ...
}

is working as expected

Steps to reproduce

Expected Behavior

Create the /tmp/z.out file

Actual Behavior

The /tmp/z.out file is not created

Versions used

CLI          
Version      3.34.1
Go Version   go1.17.11
Go Compiler  gc

Plugins
NAME        VERSION
gcp         6.28.0
kubernetes  3.19.3
python      unknown
random      4.8.0

Host     
OS       fedora
Version  36
Arch     x86_64

This project is written in python: executable='/usr/bin/python3' version='3.10.4'

Backend        
Name           8edf22ccf4ef
URL            file:///data/pulumi/.pulumi-local-states/vgervasi-dev-20220620t075904
User           root
Organizations  

Dependencies:
NAME               VERSION
gpg                1.15.1
libcomps           0.1.18
pip                21.3.1
pulumi-gcp         6.28.0
pulumi-kubernetes  3.19.3
pulumi-random      4.8.0
rpm                4.17.0
setuptools         59.6.0

Additional context

No response

Contributing

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).

EronWright commented 11 months ago

The postrender command is not run during a preview, I suppose because the provider doesn't invoke Helm during preview. Am closing as 'by design'; please re-open if you can provide a use-case for this.