This repository was archived by the owner on Jan 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
60 lines (59 loc) · 1.56 KB
/
config.yaml
File metadata and controls
60 lines (59 loc) · 1.56 KB
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
---
cog_bundle_version: 4
name: k8s
description: Interact with a Kubernetes cluster
version: 0.1.0
author: Marc Campbell <marc.e.campbell@gmail.com>, Joe Toscano <jtoscano42@gmail.com>
docker:
image: retracedhq/k8s-cog
tag: 0.1.0
permissions:
- k8s:read
- k8s:write
commands:
pods:
description: List all pods in the named cluster
executable: /home/bundle/k8s-cog/lib/cmd/pods.js
arguments: '<cluster>'
rules:
- when command is k8s:pods must have k8s:read
deploy:
description: Immediately deploy all k8s config declarations in a public Github repo
executable: /home/bundle/k8s-cog/lib/cmd/deploy.js
arguments: '<cluster> <sha>'
rules:
- when command is k8s:deploy must have k8s:write
logs:
description: Show recent logs from a given pod
executable: /home/bundle/k8s-cog/lib/cmd/logs.js
arguments: '<cluster> <pod>'
options:
count:
description: maximum number of lines to fetch
type: int
required: false
short_flag: c
rules:
- when command is k8s:logs must have k8s:read
templates:
pods:
body: |
| NAME | READY | STATUS | RESTARTS | AGE |
|------|-------|--------|----------|-----|
~each var=$results~
|~$item.name~|~$item.ready~|~$item.status~|~$item.restarts~|~$item.age~|
~end~
deploy:
body: |
| NAME | RESULT |
|------|--------|
~each var=$results~
|~$item.name~|~$item.result~|
~end~
logs:
body: |
```
~each var=$results~
~$item.line~
~end~
```