mirror of
https://github.com/khuedoan/homelab.git
synced 2024-12-22 20:34:32 +07:00
style(scripts): add some colors when wait for main apps
This commit is contained in:
parent
3561050efc
commit
df7eafe801
@ -17,11 +17,6 @@ ingresses = [
|
||||
'name': 'hajimari',
|
||||
'fullname': 'Homepage',
|
||||
'namespace': 'hajimari'
|
||||
},
|
||||
{
|
||||
'name': 'gitea',
|
||||
'fullname': 'Gitea',
|
||||
'namespace': 'gitea'
|
||||
}
|
||||
]
|
||||
|
||||
@ -39,7 +34,6 @@ def wait_app(name: str, fullname: str, namespace: str) -> None:
|
||||
)
|
||||
url = f"https://{ingress.spec.rules[0].host}"
|
||||
requests.get(url, verify=False).raise_for_status()
|
||||
sleep(3)
|
||||
console.log(f"{fullname} is ready, visit {url}")
|
||||
success = True
|
||||
except Exception:
|
||||
@ -47,12 +41,15 @@ def wait_app(name: str, fullname: str, namespace: str) -> None:
|
||||
|
||||
|
||||
def main() -> None:
|
||||
Console().rule("Waiting for essential applications")
|
||||
config.load_kube_config(config_file='./metal/kubeconfig.yaml')
|
||||
requests.urllib3.disable_warnings()
|
||||
|
||||
for ingress in ingresses:
|
||||
wait_app(ingress['name'], ingress['fullname'], ingress['namespace'])
|
||||
|
||||
print("There's more, but you can start exploring right away!")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user