Description of problem: When using oc adm router to create a router the ports are only set correctly in the environment variables when using the default 80 and 443. That means the deployment config variables for ROUTER_SERVICE_HTTP_PORT and for ROUTER_SERVICE_HTTPS_PORT are hard coded in the deployment config returned from oc adm router. Version-Release number of selected component (if applicable): 3.5 How reproducible: Every time. Steps to Reproduce: 1. oc adm router test-router --ports='8080:8080,8443:8443' --stats-port=1937 --dry-run -o yaml 2. In the yaml output, verify - name: ROUTER_SERVICE_HTTPS_PORT value: "443" - name: ROUTER_SERVICE_HTTP_PORT value: "80" ports: - containerPort: 8080 - containerPort: 8443 - containerPort: 1937 name: stats protocol: TCP 3. Actual results: The ports specified do not end up in the right environment variables. Expected results: --ports 8080:8080,8443:8443 - name: ROUTER_SERVICE_HTTPS_PORT value: "8443" - name: ROUTER_SERVICE_HTTP_PORT value: "8080" Additional info: When setting up multiple router shards we run into a place where the default router works fine as we are defaulting the ports but when specifying the ports for the second router this requires an edit to the environment variables. The current interface to oc adm router for ports is probably insufficient to determine which protocol should be used unless it is modified. Might be something like 80:80:http,443:443:https.
I understand your confusion, but --ports is really only supposed to set the port mappings in the pod. But, if you are using --host-network=true (the default) then the port-mappings are not used anyway. They don't control the way that the image inside the router listens for its port. For haproxy you would also need to set the environment variables that you identified to the appropriate values.