From 271400b9d505f65734178ab36010c051fff7bd1e Mon Sep 17 00:00:00 2001 From: Lee Date: Sat, 21 Sep 2024 04:48:44 +0000 Subject: [PATCH] Update README.md --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index a7bf3e2..5710e28 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,24 @@ This is a helper for [Traefik](https://traefik.io/) on Kubernetes. It allows you ## Todo - [ ] Use the Traefik api to list all services + +## Windows Alias + +Ensure you have ran `Set-ExecutionPolicy Unrestricted` in PowerShell as an administrator. + +Create the directory `~/Documents/WindowsPowerShell` and create a file called `traefik.kubernetes.ps1` in that directory. Add the following code to the file. + +```bash +function Traefik-Helper { + $argsAsString = $args -join ' ' + + $command = "projectlocation/traefik-helper-kubernetes/.venv/Scripts/python.exe projectlocation/traefik-helper-kubernetes/app.py $argsAsString" + + Invoke-Expression $command +} + +# Set the alias +Set-Alias -Name "traefik" -Value "Traefik-Helper" +``` + +This will allow you to run the `traefik` command in PowerShell.