cdk8s-core icon indicating copy to clipboard operation
cdk8s-core copied to clipboard

Chart namespace is applied to non-namespaced objects

Open maybedino opened this issue 1 year ago • 3 comments

Currently, if you set a namespace for a chart, it will set the namespace on every object in the chart that does not have one:

https://github.com/cdk8s-team/cdk8s-core/blob/ab3fbf376841dd37cbfb53201fd1c8169bac16ae/src/api-object.ts#L133

While every Kubernetes object can have a metadata.namespace, some are cluster objects that are not namespaced. Applying a namespace to a cluster object breaks tools that check for this, like Terraform (I was trying to deploy with cdktf-cdk8s)

maybedino avatar Sep 06 '22 17:09 maybedino