You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifying ports in values doesn't work as expected.
E.g.:
ports:
- name: 445
svcPort: 445
The template tries to fill the name in both the actual name and in targetPort, which doesn't work, as port needs to be a number and name needs to be a string:
Error: INSTALLATION FAILED: Service in version "v1" cannot be handled as a Service: json: cannot unmarshal number into Go struct field ServicePort.spec.ports.name of type string
You are right about the fact that the template tries to fill the name in both the actual name and in targetPort. TargetPort can be a string and OneChart produces internally consistent yaml.
So the question is, is there something we don't support? Why did you want to provide a port number as name and not a string?
Ah I see, I wasn't aware targetPort could be a string.
I guess I was just looking for a way to do something similar to docker compose, defining external and internal port, without having to use a name for the port.
Specifying ports in values doesn't work as expected.
E.g.:
The template tries to fill the
name
in both the actual name and intargetPort
, which doesn't work, as port needs to be a number and name needs to be a string:onechart/charts/onechart/templates/service.yaml
Lines 65 to 73 in 906958c
Instead, maybe support passing
targetPort
?Offtopic
Name could also be optional:
The template could then fill the port name with a concatenation of tcp and the port.
The text was updated successfully, but these errors were encountered: