depcon
depcon copied to clipboard
cannot unmarshal servicePort from variable
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?
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 Hi. I'm using vars file to supply variables for substitution.
@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