add readme

This commit is contained in:
Lee 2024-09-21 05:42:26 +01:00
parent 1f5a1baf95
commit 7ecc2b5aa6
2 changed files with 19 additions and 12 deletions

7
README.md Normal file

@ -0,0 +1,7 @@
# Traefik Helper (for Kubernetes)
This is a helper for [Traefik](https://traefik.io/) on Kubernetes. It allows you to add and delete services from a simple cli.
## Todo
- [ ] Use the Traefik api to list all services

24
app.py

@ -7,19 +7,19 @@ from commands import addService
from commands import deleteService
class TraefikHelper(App):
def __init__(self):
super().__init__(
description='Traefik Helper',
version='0.1',
command_manager=CommandManager('commands'),
deferred_help=False,
def __init__(self):
super().__init__(
description='Traefik Helper',
version='0.1',
command_manager=CommandManager('commands'),
deferred_help=False,
)
)
def main(argv=sys.argv[1:]):
app = TraefikHelper()
app.command_manager.add_command('add', addService.AddService)
app.command_manager.add_command('delete', deleteService.DeleteService)
return app.run(argv)
app = TraefikHelper()
app.command_manager.add_command('add', addService.AddService)
app.command_manager.add_command('delete', deleteService.DeleteService)
return app.run(argv)
if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))
sys.exit(main(sys.argv[1:]))