I’m trying to install a helm v3 chart with a custo...
# kubernetes
c
I’m trying to install a helm v3 chart with a custom kubeconfig:
Copy code
p, err := providers.NewProvider(ctx, "kubernetes", &providers.ProviderArgs{
    Kubeconfig: pulumi.StringPtr(k.kubeConfig),
})
if err != nil {
    return errors.Wrap(err, "failed to create k8s provider")
}

_, err = helmv3.NewChart(ctx, "my-chart", helmv3.ChartArgs{
    Path:      pulumi.String(filepath.Join(chartsPath, "my-chart")),
    Namespace: pulumi.String("some-ns"),
}, pulumi.Provider(p))

if err != nil {
    return errors.Wrap(err, "failed to deploy chart")
}
I’m receiving this error:
Copy code
failed to deploy k8s stack: failed to update stack: code: 0
, stdout: Updating (yarin/test-aws/k8s_us-west-2):
  pulumi:pulumi:Stack: (same)
      [urn=urn:pulumi:yarin/test-aws/k8s_us-west-2::test-aws::pulumi:pulumi:Stack::test-aws-yarin/test-aws/k8s_us-west-2]
          + pulumi:providers:kubernetes: (create)
                  [urn=urn:pulumi:yarin/test-aws/k8s_us-west-2::test-aws::pulumi:providers:kubernetes::kubernetes]
                          kubeconfig: \"CENSORED\"
                          + 1 created
                              1 unchanged
                              Duration: 5s
                              , stderr: engine: 127.0.0.1:57240resmon: 127.0.0.1:57252error: expected '::' in provider reference ''
                              : failed to run update: failed to run inline program and shutdown gracefully: rpc error: code = Unavailable desc = transport is closing"
So I’m not sure what:
Copy code
expected '::' in provider reference ''
supposed to mean
l
does it work if you change the name to something other than "kubernetes"? I wonder if that namespace is reserved. cc @gorgeous-egg-16927
c
yes! that was the issue, I’d expect that pulumi will do some sort of validation on these things or just handle these scenarios somehow
@gorgeous-egg-16927 @lemon-agent-27707 is it possible to censor the kubeconfig from the output?
l
Would you mind filing a bug.
c
g
is it possible to censor the kubeconfig from the output?
You can censor the kubeconfig with
pulumi.ToSecret()
- https://www.pulumi.com/docs/intro/concepts/programming-model/#programmatically-creating-secrets.