-
Notifications
You must be signed in to change notification settings - Fork 56
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 #97 from sagikazarmark/rabbitmq-operator
Add RabbitMQ operator chart
- Loading branch information
Showing
18 changed files
with
4,420 additions
and
1 deletion.
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 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 |
---|---|---|
|
@@ -74,6 +74,22 @@ jobs: | |
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Exclude unsupported charts | ||
id: exclusions | ||
env: | ||
DOCKER_IMAGES: "ghcr.io/${{ github.repository }}" | ||
run: | | ||
CHARTS=() | ||
for chart in $(ct list-changed); do | ||
if cat exclusions | grep "${chart} ${{ matrix.kube }}" > /dev/null; then | ||
echo "Excluding chart from testing: ${chart}" | ||
CHARTS+=("${chart#charts/}") | ||
fi | ||
done | ||
echo ::set-output name=charts::$(IFS=,; echo "${CHARTS[*]}") | ||
# See https://github.com/kubernetes-sigs/kind/releases/tag/v0.11.1 | ||
- name: Determine KinD node image version | ||
id: node_image | ||
|
@@ -102,4 +118,4 @@ jobs: | |
node_image: ${{ steps.node_image.outputs.image }} | ||
|
||
- name: Test | ||
run: ct install | ||
run: ct install --excluded-charts "${{ steps.exclusions.outputs.charts }}" |
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 @@ | ||
/tmp/ |
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,26 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ | ||
|
||
ci/ | ||
README.md.gotmpl |
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,45 @@ | ||
apiVersion: v2 | ||
type: application | ||
name: rabbitmq-operator | ||
version: 0.0.1 | ||
appVersion: 1.7.0 | ||
kubeVersion: ">=1.18.0-0" | ||
description: Kubernetes operator to deploy and manage RabbitMQ clusters. | ||
icon: https://bitnami.com/assets/stacks/rabbitmq/img/rabbitmq-stack-220x234.png | ||
keywords: | ||
- rabbitmq | ||
- message queue | ||
- AMQP | ||
- operator | ||
home: https://www.rabbitmq.com/kubernetes/operator/operator-overview.html | ||
sources: | ||
- https://github.com/rabbitmq/cluster-operator | ||
- https://github.com/sagikazarmark/helm-charts/tree/master/charts/rabbitmq-operator | ||
maintainers: | ||
- name: sagikazarmark | ||
email: [email protected] | ||
url: https://sagikazarmark.hu | ||
annotations: | ||
artifacthub.io/changes: | | ||
- kind: added | ||
description: Initial version | ||
artifacthub.io/images: | | ||
- name: operator | ||
image: rabbitmqoperator/cluster-operator:1.7.0 | ||
- name: rabbitmq | ||
image: rabbitmq:3.8.16-management | ||
artifacthub.io/operator: "true" | ||
artifacthub.io/operatorCapabilities: "Full Lifecycle" | ||
artifacthub.io/crds: | | ||
- kind: RabbitmqCluster | ||
version: rabbitmq.com/v1beta1 | ||
name: rabbitmqcluster | ||
displayName: RabbitMQ cluster | ||
description: Lifecycle (creation, upgrade, graceful shutdown) of a RabbitMQ cluster. | ||
artifacthub.io/crdsExamples: | | ||
- apiVersion: rabbitmq.com/v1beta1 | ||
kind: RabbitmqCluster | ||
metadata: | ||
name: my-cluster | ||
spec: | ||
replicas: 1 |
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,19 @@ | ||
Copyright (c) 2021 Márk Sági-Kazár <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is furnished | ||
to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,80 @@ | ||
# rabbitmq-operator | ||
|
||
    [](https://artifacthub.io/packages/helm/sagikazarmark/rabbitmq-operator) | ||
|
||
Kubernetes operator to deploy and manage RabbitMQ clusters. | ||
|
||
**Homepage:** <https://www.rabbitmq.com/kubernetes/operator/operator-overview.html> | ||
|
||
## TL;DR; | ||
|
||
```bash | ||
helm repo add skm https://charts.sagikazarmark.dev | ||
helm install --generate-name --wait skm/rabbitmq-operator | ||
``` | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| replicaCount | int | `1` | Number of replicas (pods) to launch. | | ||
| image.repository | string | `"rabbitmqoperator/cluster-operator"` | Name of the image repository to pull the container image from. | | ||
| image.pullPolicy | string | `"IfNotPresent"` | [Image pull policy](https://kubernetes.io/docs/concepts/containers/images/#updating-images) for updating already existing images on a node. | | ||
| image.tag | string | `""` | Image tag override for the default value (chart appVersion). | | ||
| imagePullSecrets | list | `[]` | Reference to one or more secrets to be used when [pulling images](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret) (from private registries). | | ||
| nameOverride | string | `""` | A name in place of the chart name for `app:` labels. | | ||
| fullnameOverride | string | `""` | A name to substitute for the full names of resources. | | ||
| serviceAccount.create | bool | `true` | Enable service account creation. | | ||
| serviceAccount.annotations | object | `{}` | Annotations to be added to the service account. | | ||
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template. | | ||
| rbac.create | bool | `true` | Enable the creation of RBAC resources. If disabled, the operator (ie. the person installing the chart) is responsible for creating the necessary resources based on the templates. | | ||
| podAnnotations | object | `{}` | Annotations to be added to pods. | | ||
| priorityClassName | string | `""` | Specify a priority class name to set [pod priority](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority). | | ||
| podSecurityContext | object | `{}` | Pod [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context) for details. | | ||
| securityContext | object | `{}` | Container [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1) for details. | | ||
| podMonitor.enabled | bool | `false` | Enable Prometheus PodMonitor to monitor the operator. | | ||
| podMonitor.interval | string | `"30s"` | Interval at which metrics should be scraped. | | ||
| resources | object | No requests or limits. | Container resource [requests and limits](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#resources) for details. | | ||
| nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) configuration. | | ||
| tolerations | list | `[]` | [Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for node taints. See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling) for details. | | ||
| affinity | object | `{}` | [Affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) configuration. See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling) for details. | | ||
| rabbitmq.serviceMonitor.enabled | bool | `false` | Enable Prometheus ServiceMonitor to monitor RabbitMQ clusters created by the operator. | | ||
| rabbitmq.serviceMonitor.interval | string | `"30s"` | Interval at which metrics should be scraped. | | ||
|
||
## Development | ||
|
||
### Updating the operator | ||
|
||
Always start by getting the latest manifest for the operator: | ||
|
||
```bash | ||
VERSION="1.7.0" | ||
|
||
mkdir tmp | ||
|
||
curl -L "https://github.com/rabbitmq/cluster-operator/releases/download/v${VERSION}/cluster-operator.yml" > tmp/cluster-operator.yaml | ||
``` | ||
|
||
Download the k8split tool: | ||
|
||
```bash | ||
go get github.com/brendanjryan/k8split | ||
``` | ||
|
||
Split up the resources: | ||
|
||
```bash | ||
k8split -o tmp tmp/cluster-operator.yaml | ||
``` | ||
|
||
Update the templates based on the created resources. | ||
|
||
Finally, clean up the resources: | ||
|
||
```bash | ||
rm -rf tmp | ||
``` | ||
|
||
## Attribution | ||
|
||
This chart is created from the "remains" of the official chart removed in [#296](https://github.com/rabbitmq/cluster-operator/pull/296). |
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,41 @@ | ||
{{ template "chart.baseHead" . }} | ||
|
||
{{ template "chart.valuesSection" . }} | ||
|
||
## Development | ||
|
||
### Updating the operator | ||
|
||
Always start by getting the latest manifest for the operator: | ||
|
||
```bash | ||
VERSION="1.7.0" | ||
|
||
mkdir tmp | ||
|
||
curl -L "https://github.com/rabbitmq/cluster-operator/releases/download/v${VERSION}/cluster-operator.yml" > tmp/cluster-operator.yaml | ||
``` | ||
|
||
Download the k8split tool: | ||
|
||
```bash | ||
go get github.com/brendanjryan/k8split | ||
``` | ||
|
||
Split up the resources: | ||
|
||
```bash | ||
k8split -o tmp tmp/cluster-operator.yaml | ||
``` | ||
|
||
Update the templates based on the created resources. | ||
|
||
Finally, clean up the resources: | ||
|
||
```bash | ||
rm -rf tmp | ||
``` | ||
|
||
## Attribution | ||
|
||
This chart is created from the "remains" of the official chart removed in [#296](https://github.com/rabbitmq/cluster-operator/pull/296). |
Oops, something went wrong.