You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are outstanding issues #1481 and #800 about extra status messages, but with a simple transform you can move past that and install most helm charts.
However cert-manager manages to make the values argument throw a AssertionError about the type not being a dict. This has not happened on other Helm charts thus far.
Expected behavior
pulumi_kubernetes.helm.v3 is able to keep the values dict a dict.
Current behavior
For some reason the this helm chart makes pulumi change the type of the passed values object, causing a type error later down the line.
Steps to reproduce
1. versions
pulumi @ 3.1.0
pulumi_kubernetes @ 3.0.0
cert-manager chart @ 1.3.1
2. Code
import pulumi_kubernetes as k8s
from pulumi_kubernetes.helm.v3 import Chart, LocalChartOpts
# Hack to resolve other issues #1481 and #800
def remove_status(obj, opts):
if obj["kind"] == "CustomResourceDefinition" and "status" in obj:
del obj["status"]
cert_manager_ns = k8s.core.v1.Namespace("cert-manager", metadata={"name": "cert-manager"})
cert_manager_helm = Chart(
"cert-manager",
LocalChartOpts(
path="./charts/cert-manager",
namespace=cert_manager_ns._name,
values={"installCRDs": True},
transformations=[remove_status],
)
)
If you remove values={"installCRDs": True}, then there is no error.
Context (Environment)
I am experimenting with Pulumi and debating on transforming everything from terraform to pulumi. The real benefit is the state files are encrypted at rest.
Many vendor products, such as cert-manager are primarily installed via helm charts.
The consul Helm chart from HashiCorp has the same problem as well as what's reported in #1481. The transformation hack fixes the status issue but there doesn't seem to be a workaround for the type issue.
I tried adding a recursive function to cast it all to dicts but it didn't seem to change anything.
The same error happens applying cert-manager-v1.0.2.yaml via k8s.yaml.ConfigFile() (i.e. without helm) and happens without running the 'remove status transform'.
If you comment out yaml from the bottom up in that file you can find the part that pulumi 3 doesn't like, which is
There are outstanding issues #1481 and #800 about extra status messages, but with a simple transform you can move past that and install most helm charts.
However cert-manager manages to make the
values
argument throw a AssertionError about the type not being a dict. This has not happened on other Helm charts thus far.Expected behavior
pulumi_kubernetes.helm.v3 is able to keep the values dict a dict.
Current behavior
For some reason the this helm chart makes pulumi change the type of the passed values object, causing a type error later down the line.
Steps to reproduce
1. versions
2. Code
3. Error
Note:
If you remove
values={"installCRDs": True},
then there is no error.Context (Environment)
I am experimenting with Pulumi and debating on transforming everything from terraform to pulumi. The real benefit is the state files are encrypted at rest.
Many vendor products, such as cert-manager are primarily installed via helm charts.
Interestingly, there is even an official example using cert-manager helm chart: https://github.com/pulumi/cert-manager-examples/blob/master/cert-manager/cert-manager.ts
It seems that example cannot work because of issues #1481 and #800.
The text was updated successfully, but these errors were encountered: