how can i prevent auto-naming for created namespac...
# kubernetes
h
how can i prevent auto-naming for created namespaces? tried to follow links via FAQ, but haven't been able to figure it out yet with python, azure-native, pulumi_kubernetes:
1
Copy code
k8s.core.v1.Namespace(
        resource_name=name,  # NEED TO HAVE THIS AS IT IS
        opts=p.ResourceOptions(
            provider=k8s_provider,  # via kubeconfig from AKS ManagedCluster output
            delete_before_replace=True,
            parent=aks,
        ),
    )
... by setting:
Copy code
k8s.core.v1.Namespace(
...
        metadata=k8s.meta.v1.ObjectMetaArgs(
            name=name,
        ),
...
)
c
You could do something like this
h
just to confirm - you mean setting metadata.name explicitly, right?
c
correct, cause you are running into this.
👍 1
h
got it, thanks! that's how i fixed it (second snippet that i added above for posterity)