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
Using []yaml.transformation with helm/v3 while the same code works with helm/v2:
error: program failed: json: unsupported type: func(map[string]interface {}, ...pulumi.ResourceOption)
exit status 1
error: an unhandled error occurred: program exited with non-zero exit code: 1
Affected product version(s)
pulumi v2.13.2
pulumi-kubernetes sdk v2.6.3
go version 1.15.3
Reproducing the issue
consider the following pulumi program:
package main
import (
"github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/helm/v3""github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/yaml""github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
funcmain() {
pulumi.Run(func(ctx*pulumi.Context) error {
_, err:=helm.NewChart(ctx, "jaeger-operator", helm.ChartArgs{
Chart: pulumi.String("jaeger-operator"),
FetchArgs: helm.FetchArgs{
Repo: pulumi.String("https://jaegertracing.github.io/helm-charts"),
},
Transformations: []yaml.Transformation{
// when the operator pod starts it overrides the// .spec.selector of svc/jaeger-operator-metrics field to// `name=jaeger-operator` which is missing from the pod labels,// so the endpoints are never created. we add that label here to mitigate thatfunc(statemap[string]interface{}, opts...pulumi.ResourceOption) {
ifstate["kind"] =="Deployment" {
podTemplate:=state["spec"].(map[string]interface{})["template"].(map[string]interface{})
podLabels:=podTemplate["metadata"].(map[string]interface{})["labels"].(map[string]interface{})
podLabels["name"] ="jaeger-operator"
}
},
},
})
iferr!=nil {
returnerr
}
returnnil
})
}
it fails with the error above, but using github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/helm/v2 works as expected and pulumi is able to create the resources just fine
The text was updated successfully, but these errors were encountered:
Problem description
Using
[]yaml.transformation
withhelm/v3
while the same code works withhelm/v2
:Affected product version(s)
pulumi
v2.13.2
pulumi-kubernetes sdk
v2.6.3
go version
1.15.3
Reproducing the issue
consider the following pulumi program:
it fails with the error above, but using
github.com/pulumi/pulumi-kubernetes/sdk/v2/go/kubernetes/helm/v2
works as expected and pulumi is able to create the resources just fineThe text was updated successfully, but these errors were encountered: