From 10479b5c7aae14af2f0c25cf23a1fc83a5d231ec Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 21 Sep 2024 05:56:41 +0100 Subject: [PATCH] update --- README.md | 23 +++++++++++++++++++---- requirements.txt | Bin 0 -> 362 bytes 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 requirements.txt diff --git a/README.md b/README.md index 5710e28..7abd875 100644 --- a/README.md +++ b/README.md @@ -2,27 +2,42 @@ This is a helper for [Traefik](https://traefik.io/) on Kubernetes. It allows you to add and delete services from a simple cli. -## Todo +## Usage -- [ ] Use the Traefik api to list all services +1. Clone the repository +2. Install the dependencies (`pip install -r requirements.txt`) +3. Go to the Windows Alias section ## 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. +Create the directory `~/Documents/WindowsPowerShell` and create a file called `traefik.kubernetes.ps1` in that directory. Add the following code to the file. Below is an example on how to run the `traefik` command in PowerShell. ```bash function Traefik-Helper { + $helperPath = "C:\Users\Liam\Desktop\Projects\traefik-helper-kubernetes" + + # Set the static environment variable + $env:SERVICES_PATH = "c:\Users\Liam\Nextcloud\Kubernetes\traefik\external" + + # Convert the arguments to a string $argsAsString = $args -join ' ' - $command = "projectlocation/traefik-helper-kubernetes/.venv/Scripts/python.exe projectlocation/traefik-helper-kubernetes/app.py $argsAsString" + # Construct the command + $command = "python $helperPath\app.py $argsAsString" + # Run the command with the environment variable Invoke-Expression $command } # Set the alias Set-Alias -Name "traefik" -Value "Traefik-Helper" + ``` This will allow you to run the `traefik` command in PowerShell. + +## Todo + +- [ ] Use the Traefik api to list all services diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..6fcef7c623ccab0a2c7d7b9d7f4d2c16e917e575 GIT binary patch literal 362 zcmYk2%?iRW5QOI}_$sBgRq^1#yMkAbv5h}aHCVOe<<*&u6j>Tdc4qe5eBKTZ)*T&| ztO6A>o*8nCF@nRB-5Ub`j_{_**`1n7iW)7>II!fGdp@{pT+lErC1=(xEjM7#nYy1* zJsBK