koki / short

Manageable Kubernetes manifests through a composable, reusable syntax
https://docs.koki.io/short
Apache License 2.0
122 stars 14 forks source link

Service Type LB bug #60

Closed wlan0 closed 6 years ago

wlan0 commented 6 years ago

Service Type LB changes to Service Type ClusterIP

This input yaml

service:
  version: v1
  name: docs
  port: 80:3000
  selector:
    app: docs.koki.io
  type: LoadBalancer

gets transformed to

- apiVersion: v1
  kind: Service
  metadata:
    creationTimestamp: null
    name: docs
  spec:
    ports:
    - port: 80
      protocol: TCP
      targetPort: 3000
    selector:
      app: docs.koki.io
    type: ClusterIP
  status:
    loadBalancer: {}
ublubu commented 6 years ago

type: LoadBalancer isn't actually part of the Service shorthand.

If you want to specify that it's a loadbalancer service, use loadbalancer: true

ublubu commented 6 years ago

but actually there might be another issue because NodePort can be system-provided. i need to add a type field because type: NodePort cannot be inferred from other fields either.

wlan0 commented 6 years ago

That doesn't sound right. I would rather just specify the type. We don't want to make it harder for them to use our syntax.

Let's add a type field with the appropriate types.