This message was deleted.
# general
s
This message was deleted.
b
in this case, you'd just create a namespace and pass it as a paramter to your helm chart, which language sdk are you using?
r
Thanks, using Go. Using
corev1.NewNamespace
and then grabbing the autogenerated name of the new namespace in string format as input for the
helm.NewChart
doesn't appear to be trivial, so any guidance would be much appreciated.
b
@ripe-oil-46657 to give a short example:
Copy code
_, err = helmv3.NewChart(ctx, "superset", helmv3.ChartArgs{
		Repo:      pulumi.String("superset"),
		Chart:     pulumi.String("superset"),
		Namespace: ns.Metadata.Name().Elem().ToStringOutput(),
		FetchArgs: helmv3.FetchArgs{
			Repo: pulumi.String("<https://apache.github.io/superset>"),
		},
        ...
	}, pulumi.Provider(k8sProvider))
b
something like this:
Copy code
ns, err := corev1.NewNamespace(ctx, "nginx-ingess", &corev1.NamespaceArgs{
			Metadata: &metav1.ObjectMetaArgs{
				Name: pulumi.String("nginx-ingress"),
			},
		})

		// Helm chart
		_, err = helm.NewChart(ctx, "test", helm.ChartArgs{
			Chart:   pulumi.String("stable/nginx-ingress"),
			Namespace: ns.Metadata.Name().Elem(),
			Version: pulumi.String("1.36.3"),
		}, pulumi.Provider(provider))
r
@bored-table-20691, @billowy-army-68599 brilliant, it is trivial if your know what you are doing! 😉 Both examples work, many thanks for the help!