depcon icon indicating copy to clipboard operation
depcon copied to clipboard

cannot unmarshal servicePort from variable

Open kamsz opened this issue 8 years ago • 3 comments

Hi,

I've set my portMappings as below:

          portMappings:
            - containerPort: 80
              servicePort: ${SERVICE_PORT}
              protocol: tcp

But I'm unable to create an application with servicePort as a variable due to:

2017-02-27 08:43:01 ERROR [depcon]: error unmarshaling JSON: json: cannot unmarshal string into Go value of type int

Is there any way to convert this value to an integer?

kamsz avatar Feb 27 '17 07:02 kamsz

Can you provide the exact command you're using? I just test this using the latest 0.9.4 release and it worked/parsed just fine. Note: My variable name was ${SP} and ran it using a -p SP=4444 and it worked fine.

gondor avatar Mar 27 '17 06:03 gondor

@gondor Hi. I'm using vars file to supply variables for substitution.

kamsz avatar Mar 27 '17 06:03 kamsz

@gondor Tested with 0.9.4:

              servicePort: ${SERVICE_PORT}

vars file:

SERVICE_PORT=10201

results in:

2017-03-27 10:19:14 ERROR [depcon]: error unmarshaling JSON: json: cannot unmarshal string into Go value of type int

kamsz avatar Mar 27 '17 08:03 kamsz