-
Notifications
You must be signed in to change notification settings - Fork 7
/
test-runbook.yml
94 lines (94 loc) · 3.12 KB
/
test-runbook.yml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
apiVersion: platform.plural.sh/v1alpha1
kind: Runbook
metadata:
name: scaling
namespace: rabbitmq
labels:
platform.plural.sh/pinned: 'true'
spec:
name: Vertical scaling
description: overview of how to accurately scale your rabbitmq cluster
display: |
<root gap='medium'>
<box pad='small' gap='medium' direction='row' align='center'>
<box direction='row' align='center' gap='small'>
<box gap='small' align='center'>
<timeseries datasource="cpu" label="CPU Usage" />
<text size='small'>You should set a reservation to
roughly correspond to 60% utilization</text>
</box>
<box gap='small' align='center'>
<timeseries datasource="memory" label="Memory Usage" />
<text size='small'>You should set a reservation to
roughly correspond to 80% utilization</text>
</box>
</box>
<box gap='small'>
<box gap='xsmall'>
<input placeholder="250m" label='CPU Request' name='cpu'>
<valueFrom
datasource="statefulset"
doc="kubernetes.raw"
path="spec.template.spec.containers[0].resources.requests.cpu" />
</input>
<input placeholder="1Gi" label='Memory Request' name='memory'>
<valueFrom
datasource="statefulset"
doc="kubernetes.raw"
path="spec.template.spec.containers[0].resources.requests.memory" />
</input>
</box>
<box direction='row' justify='end'>
<button label='Scale' action='scale' primary='true' />
</box>
</box>
</box>
<box width='100%' gap='small'>
<text size='small'>Be sure to scale your rabbitmq nodes within your nodes capacities, listed here:</text>
<table width='100%' datasource='nodes' path='nodes'>
<tableColumn path='metadata.name' header='name' width='33%' />
<tableColumn path='status.capacity.cpu' header='cpu' width='33%' />
<tableColumn path='status.capacity.memory' header='memory' width='33%' />
</table>
</box>
</root>
datasources:
- name: cpu
type: prometheus
prometheus:
format: cpu
legend: $pod
query: sum(rate(container_cpu_usage_seconds_total{namespace="rabbitmq",pod=~"rabbitmq-server-[0-9]+"}[5m])) by (pod)
- name: memory
type: prometheus
prometheus:
format: memory
legend: $pod
query: sum(container_memory_working_set_bytes{namespace="rabbitmq",pod=~"rabbitmq-server-[0-9]+",image!="",container!=""}) by (pod)
- name: statefulset
type: kubernetes
kubernetes:
resource: statefulset
name: rabbitmq-server
- name: nodes
type: nodes
actions:
- name: scale
action: config
redirectTo: '/'
configuration:
updates:
- path:
- cluster-operator
- cluster
- resources
- requests
- cpu
valueFrom: cpu
- path:
- cluster-operator
- cluster
- resources
- requests
- memory
valueFrom: memory