Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service not applying port params #44

Closed
beetahnator opened this issue Jan 3, 2020 · 0 comments · Fixed by #45
Closed

Service not applying port params #44

beetahnator opened this issue Jan 3, 2020 · 0 comments · Fixed by #45
Assignees

Comments

@beetahnator
Copy link
Contributor

beetahnator commented Jan 3, 2020

ports defined in the kx.Service args.spec.ports param don't get created.

import * as kubex from "@pulumi/kubernetesx";

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

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


const service = new kubex.Service(
  'test',
  {
    metadata: { namespace: 'kube-system' },
    spec: {
      selector: {
        app: 'caddy'
      },
      ports: [
        {
          port: 8000,
          name: 'http'
        }
      ]
    }
  }
)

Preview shows no ports being applied

+ kubernetes:core/v1:Service: (create)
+   [urn=xxxxxxx]
+   [provider=xxxxxxxxxxxx]
+   apiVersion: "v1"
+   kind      : "Service"
+   metadata  : {
+       annotations: {
+           pulumi.com/autonamed: "true"
+       }
+       labels     : {
+           app.kubernetes.io/managed-by: "pulumi"
+       }
+       name       : "test-mr4g6lcj"
+       namespace  : "kube-system"
+   }
+   spec      : {
+       selector: {
+           app: "caddy"
+       }
+   }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants