ripe-oil-46657
06/17/2021, 3:15 PMhelm3 --create-namespace
argument in the helm.NewChart
function in Go? I would like to create a new namespace as part of the chart deployment.billowy-army-68599
06/17/2021, 6:06 PMripe-oil-46657
06/17/2021, 6:36 PMcorev1.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.bored-table-20691
06/17/2021, 6:43 PM_, 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))
billowy-army-68599
06/17/2021, 6:48 PMns, 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))
ripe-oil-46657
06/17/2021, 6:59 PM