pulumi / pulumi-kubernetesx

Kubernetes for Everyone
Apache License 2.0
135 stars 16 forks source link

`createService()` does not match namespace of deployment #43

Closed beetahnator closed 4 years ago

beetahnator commented 4 years ago

When using kubex.Deployment.createService(), the service will always be created in the default namespace.

Example:

import * as kx from "@pulumi/kubernetesx"

const pod = new kx.PodBuilder({
  containers: [
    {
      image: 'abiosoft/caddy'
    }
  ]
})

const deployment = new kx.Deployment('test',
  {
    metadata: {
      namespace: 'kube-system'
    },
    spec: pod.asDeploymentSpec()
  }
)

deployment.createService()