pulumi / pulumi-kubernetes

A Pulumi resource provider for Kubernetes to manage API resources and workloads in running clusters
https://www.pulumi.com/docs/reference/clouds/kubernetes/
Apache License 2.0
407 stars 116 forks source link

Kustomize support defaults to wrong namespace #2560

Open jaxxstorm opened 1 year ago

jaxxstorm commented 1 year ago

What happened?

A customer is running a kustomize deploy within a Kubernetes cluster CI/CD pipeline.

They kustomize deployment does not set a namespace in the manifests.

The CI/CD pipeline runner sets .kube/config globally inside the pod it runs

When provisioning the resources, the kustomize deploy correctly targets the right cluster frok the KUBECONFIG but somehow inherits the namespace from the pipeline it's running in, which doesn't exist in the remote cluster.

Expected Behavior

The deployment should not inherit the namespace from where it's running

Steps to reproduce

It's not an easy repro, but.

Output of pulumi about

N/A

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

EronWright commented 1 year ago

@jaxxstorm could you clarify which namespace is actually used? Is the context namespace in the .kube/config honored?

jaxxstorm commented 1 year ago

@EronWright no, it doesn't seem to be