-
Notifications
You must be signed in to change notification settings - Fork 0
/
k.py
60 lines (53 loc) · 1.8 KB
/
k.py
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import sys
from workflow import Workflow
from icons import SHELL, LOGS, DATADOG, DASHBOARD, KUBE, WATCH, BIN
def main(wf):
wf.add_item(title="kl",
subtitle="Access services logs.",
valid=False,
autocomplete="l",
icon=LOGS)
wf.add_item(title="ks",
subtitle="Access services shell.",
valid=False,
autocomplete="s",
icon=SHELL)
wf.add_item(title="kw",
subtitle="Run service watch",
valid=False,
autocomplete="w",
icon=WATCH)
wf.add_item(title="kr",
subtitle="Delete services.",
valid=False,
autocomplete="r",
icon=BIN)
wf.add_item(title="kd",
subtitle="Access kubernetes dashboard.",
valid=False,
autocomplete="d",
icon=DASHBOARD)
wf.add_item(title="kds",
subtitle="Access kubernetes dashboard - by service",
valid=False,
autocomplete="ds",
icon=DASHBOARD),
wf.add_item(title="kdm",
subtitle="Show datadog CPU/Memory metrics for a deployment.",
valid=False,
autocomplete="dm",
icon=DATADOG)
wf.add_item(title="ksetenv",
subtitle="Set Workflow variables.",
valid=False,
autocomplete="setenv",
icon=KUBE),
wf.add_item(title="kclearvars",
subtitle="Clear all Workflow variables.",
valid=False,
autocomplete="clearvars",
icon=KUBE),
wf.send_feedback()
if __name__ == u"__main__":
wf = Workflow()
sys.exit(wf.run(main))