-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from gboutry/feat/[email protected]
Migrate base to [email protected]
- Loading branch information
Showing
10 changed files
with
213 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,180 @@ | ||
type: "charm" | ||
bases: | ||
- build-on: | ||
- name: "ubuntu" | ||
channel: "22.04" | ||
run-on: | ||
- name: "ubuntu" | ||
channel: "22.04" | ||
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] | ||
after: | ||
- update-certificates | ||
build-packages: | ||
- git | ||
- libffi-dev | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
if [[ -f "rabbitmq-k8s.charm" ]]; then | ||
echo "Removing existing rabbitmq-k8s.charm" | ||
rm rabbitmq-k8s.charm | ||
fi | ||
|
||
for f in rabbitmq-k8s*.charm; do | ||
echo "Renaming $f to rabbitmq-k8s.charm" | ||
mv "$f" "rabbitmq-k8s.charm" | ||
break | ||
done |
Oops, something went wrong.