Coverage for kube_notify/__init__.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.6.0, created at 2025-02-07 09:16 +0000

1import argparse 

2import datetime 

3 

4__version__ = "0.0.0" 

5STARTUP_TIME = datetime.datetime.now(datetime.UTC).replace(tzinfo=None) 

6type EventInfo = tuple[datetime.datetime, str, str, str, str, str, str, str] 

7parser = argparse.ArgumentParser( 

8 prog=f"kube-notify-{__version__}", 

9 description="An app that watches kubernetes resource creation, deletion, updates and errors events and notify selected events to gotify.", 

10 epilog="Made with passion by LawiK974.", 

11) 

12 

13parser.add_argument("-c", "--config", type=str, help="Path to the config file") 

14parser.add_argument("--version", action="version", version=__version__) 

15parser.add_argument("--inCluster", action="store_true", help="Running in cluster") 

16parser.add_argument( 

17 "--context", 

18 type=str, 

19 help="Kube config context to use (check `kubectl config current-context`)", 

20)