-
Notifications
You must be signed in to change notification settings - Fork 4
/
charmcraft.yaml
186 lines (176 loc) · 4.38 KB
/
charmcraft.yaml
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
type: charm
name: rabbitmq-k8s
summary: RabbitMQ charmed operator for Kubernetes
description: RabbitMQ
links:
documentation: https://discourse.charmhub.io/t/thedac-rabbitmq-operator-docs-index/4630
base: [email protected]
platforms:
amd64:
config:
options:
minimum-replicas:
default: 3
description:
Minimum number of queues replicas, set to 0 to disable charm automatically
managing queue replicas
type: int
auto-ha-frequency:
default: 30
description: Frequency in minutes to check for queues that need HA members added
type: int
actions:
get-operator-info:
description: |
Get information on the operator user for rabbitmq management.
get-service-account:
description: |
Generate credentials and access for an external service.
params:
username:
type: string
description: The username for the service account.
vhost:
type: string
description: The RabbitMQ virtual host to use for the account.
required:
- username
- vhost
additionalProperties: false
ensure-queue-ha:
description: |
Check for queues that have insufficent members for high
availability and, if possible, add members to them.
params:
dry-run:
type: boolean
default: false
description: |
Report on what memberships would change if the command was
run and warn about any queues that cannot be fixed.
rebalance-quorum:
description: |
Rebalance queue leaders to that they are evenly balanced
across the cluster.
add-member:
description: Add member to queue
params:
queue-name:
type: string
description: |
Name of queue to add the member to.
unit-name:
type: string
description: |
Juju unit name of the node to be added to the queue
vhost:
type: string
description: |
vhost that the queue resides in.
required:
- queue-name
- unit-name
delete-member:
description: Remove member from queue
params:
queue-name:
type: string
description: |
Name of queue to remove the member from.
unit-name:
type: string
description: |
Juju unit name of the node to be removed from the queue
vhost:
type: string
description: |
vhost that the queue resides in.
required:
- queue-name
- unit-name
grow:
description: |
Adds a new replica on the given node for all or a half
of matching quorum queues.
params:
selector:
type: string
description: |
Valid values are "all" or even"
unit-name:
type: string
description: |
Juju unit name of the node to have queues added
vhost-pattern:
type: string
description: |
Match vhosts to be added to the node
queue-pattern:
type: string
description: |
Match queues to be added to the node
required:
- unit-name
- selector
shrink:
description: |
Shrinks quorum queue clusters by removing any members (replicas)
on the given node.
params:
unit-name:
type: string
description: |
Juju unit name of the node to have queues added
error-only:
type: boolean
default: false
description: |
Only list queues which reported an error
required:
- unit-name
containers:
rabbitmq:
resource: rabbitmq-image
mounts:
- storage: rabbitmq-data
location: /var/lib/rabbitmq
resources:
rabbitmq-image:
type: oci-image
description: OCI image for rabbitmq
upstream-source: ghcr.io/canonical/rabbitmq:3.12.1
storage:
rabbitmq-data:
type: filesystem
requires:
ingress:
interface: ingress
limit: 1
logging:
interface: loki_push_api
optional: true
provides:
amqp:
interface: rabbitmq
peers:
peers:
interface: rabbitmq-peer
parts:
update-certificates:
plugin: nil
override-build: |
apt update
apt install -y ca-certificates
update-ca-certificates
charm:
after:
- update-certificates
build-packages:
- git
- libffi-dev
- libssl-dev
- rustc
- cargo
charm-binary-python-packages:
- cryptography
- jsonschema