TL;DR: - You can make an HTTP redirector using the new tool-containers/redirect:latest [0]
In 2020 I documented a way to use a bare Kubernetes ingress object to redirect HTTP requests from one tool to another.[1] This method was used by a number of tools I managed and some additional tools to give aliases to help with discoverability, redirect to wiki pages, redirect to Cloud VPS projects, or migrate users to a different tool. It was a nice solution at the time because it did not require additional resources from the Kubernetes cluster beyond configuring the existing shared nginx ingress service. Changes in newer versions of the nginx ingress product have broken the prior method, so we needed to find a different solution. I spent a few days poking at the problem and decided to write a small golang webserver that narrowly does the things that were needed to replace the existing redirecting ingress objects.[0][2] I have packaged this as a Toolforge build service managed container that any Toolforge tool can pull from the registry for its own use. Taavi and I have replaced all of the legacy redirecting ingress objects we could find with the new containerized solution.[3] If you have a tool we missed and need help converting, please do reach out to me via email, irc, phabricator, or carrier pigeon. If you have a tool that is doing redirects a different way, like with lighttpd config and a legacy PHP container, take a look at the new service and see if it might be a good replacement. Feature requests can be filed in Phabricator as well.[4] [0]: https://wikitech.wikimedia.org/wiki/Tool:Containers#Redirect_container [1]: https://wikitech.wikimedia.org/wiki/User:BryanDavis/Kubernetes#Make_a_tool_redirect_to_another_tool_WITHOUT_running_a_webservice [2]: https://gitlab.wikimedia.org/toolforge-repos/containers-redirect [3]: https://phabricator.wikimedia.org/T409474 [4]: https://phabricator.wikimedia.org/tag/tool-containers/ Bryan -- Bryan Davis Wikimedia Foundation Principal Software Engineer Boise, ID USA [[m:User:BDavis (WMF)]] irc: bd808 _______________________________________________ Cloud mailing list -- [email protected] List information: https://lists.wikimedia.org/postorius/lists/cloud.lists.wikimedia.org/
