Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kubeconfig: Use user provided ingress https port for token dialer
Current implementation have issue if user provided non default https port because during token creation request goes from api server to auth service which uses default https port and resulted following error for user mode networking (there is no support for customize http/https route for system mode networking) ``` INFO Adding crc-admin and crc-developer contexts to kubeconfig... ERRO Cannot update kubeconfig: Head "https://oauth-openshift.apps-crc.testing": dial tcp 127.0.0.1:443: connect: connection refused ``` With this PR we are passing that https port info to `addContext` function and use it for dialer where we update the port in case request have `oauth-openshift` as part of address which resolve this issue. ``` $ ./crc config view - consent-telemetry : no - enable-bundle-quay-fallback : true - ingress-http-port : 9080 - ingress-https-port : 9443 $ ./crc start --log-level debug [...] level=info msg="Adding crc-admin and crc-developer contexts to kubeconfig..." level=debug msg="Using address: api.crc.testing:6443" level=debug msg="Dialing to 127.0.0.1:6443" level=debug msg="Using address: oauth-openshift.apps-crc.testing:443" level=debug msg="Dialing to 127.0.0.1:9443" level=debug msg="Using address: oauth-openshift.apps-crc.testing:443" level=debug msg="Dialing to 127.0.0.1:9443" level=debug msg="Using address: api.crc.testing:6443" level=debug msg="Dialing to 127.0.0.1:6443" level=debug msg="Using address: oauth-openshift.apps-crc.testing:443" level=debug msg="Dialing to 127.0.0.1:9443" level=debug msg="Using address: oauth-openshift.apps-crc.testing:443" level=debug msg="Dialing to 127.0.0.1:9443" [...] ```
- Loading branch information