spec icon indicating copy to clipboard operation
spec copied to clipboard

Services port protocol does not translate well to compose

Open fernando-villalba opened this issue 2 years ago • 1 comments

If I do the following:

apiVersion: score.dev/v1b1
metadata:
  name: frontend
containers:
  frontend:
    image: nginx:alpine
service:
  ports:
    www:
      port: 80
      protocol: TCP
      targetPort: 80

It translates to helm values correctly like so:

containers:
  frontend:
    image:
      name: nginx:alpine
service:
  ports:
    - name: www
      port: 80
      protocol: TCP
      targetPort: 80
  type: ClusterIP

How it does not translate correctly to compose:

services:
  frontend:
    image: nginx:alpine
    ports:
      - target: 80
        published: "80"
        protocol: TCP

Becuase in compose the protocol needs to be specified in lower case, otherwise it fails.

fernando-villalba avatar Nov 18 '22 11:11 fernando-villalba