Closed siegfriedweber closed 4 months ago
abc-def
is pretty common and can be trivially translated to ABC_DEF
. I'd argue that 123-abc
is far less common, and while switching to a PORT_
prefix would fix it, I'm not sure it's worth the compatibility break.
Port names with dashes are not supported in sidecar containers
The following example adds an OAuth proxy to the HDFS name nodes via
podOverrides
. A port is defined with a name that contains a dash.The namenode container uses this bash script to export the ports as environment variables:
This leads to the following error:
The problem is that
-
is not allowed in an environment variable name.A solution would be to convert the port name to a valid environment variable name. Attention must be paid because port names can start with a digit, e.g.
123-web
, whereas environment variables cannot.Another solution would be to not export these ports.