-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
32 lines (24 loc) · 779 Bytes
/
main.py
File metadata and controls
32 lines (24 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import sys
import shutil
from src import config, state
from src.display import console, print_banner
from src.cluster_manager import ClusterManager
def main():
if not shutil.which("az"):
console.print(
"[bold red]az CLI not found.[/bold red] "
"Install the Azure CLI and run `az login` first."
)
sys.exit(1)
# Load persisted seen-pod state before starting any watchers
state.init()
print_banner(config.AKS_RESOURCE_GROUP, config.CLUSTER_SYNC_INTERVAL)
console.print(
f"[dim]State directory: [cyan]{config.STATE_DIR}[/cyan][/dim]\n"
)
try:
ClusterManager().start()
except KeyboardInterrupt:
console.print("\n[dim]Stopped.[/dim]")
if __name__ == "__main__":
main()