You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+48
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,50 @@ list][rmq-users]. This would include YAML manifests, Kubernetes version,
21
21
RabbitMQ Operator logs and any other relevant information that might help
22
22
to diagnose the problem.
23
23
24
+
## Makefile
25
+
26
+
This project contains a Makefile to perform common development operation. If you want to build, test or deploy a local copy of the repository, keep reading.
27
+
28
+
### Required environment variables
29
+
30
+
The following environment variables are required by many of the `make` targets to access a custom-built image:
31
+
32
+
- DOCKER_REGISTRY_SERVER: URL of docker registry containing the Operator image (e.g. `registry.my-company.com`)
33
+
- OPERATOR_IMAGE: path to the Operator image within the registry specified in DOCKER_REGISTRY_SERVER (e.g. `rabbitmq/cluster-operator`). Note: OPERATOR_IMAGE should **not** include a leading slash (`/`)
34
+
35
+
When running `make deploy-dev`, additionally:
36
+
37
+
- DOCKER_REGISTRY_USERNAME: Username for accessing the docker registry
38
+
- DOCKER_REGISTRY_PASSWORD: Password for accessing the docker registry
39
+
- DOCKER_REGISTRY_SECRET: Name of Kubernetes secret in which to store the Docker registry username and password
40
+
41
+
#### Make targets
42
+
43
+
-**controller-gen** Download controller-gen if not in $PATH
44
+
-**deploy** Deploy operator in the configured Kubernetes cluster in ~/.kube/config
45
+
-**deploy-dev** Deploy operator in the configured Kubernetes cluster in ~/.kube/config, with local changes
46
+
-**deploy-kind** Load operator image and deploy operator into current KinD cluster
47
+
-**deploy-sample** Deploy RabbitmqCluster defined in config/sample/base
48
+
-**destroy** Cleanup all operator artefacts
49
+
-**kind-prepare** Prepare KinD to support LoadBalancer services, and local-path StorageClass
50
+
-**kind-unprepare** Remove KinD support for LoadBalancer services, and local-path StorageClass
51
+
-**list** List Makefile targets
52
+
-**run** Run operator binary locally against the configured Kubernetes cluster in ~/.kube/config
53
+
-**unit-tests** Run unit tests
54
+
-**integration-tests** Run integration tests
55
+
-**system-tests** Run end-to-end tests against Kubernetes cluster defined in ~/.kube/config
56
+
57
+
### Testing
58
+
59
+
Before submitting a pull request, ensure all local tests pass:
60
+
-`make unit-tests`
61
+
-`make integration-tests`
62
+
63
+
<!-- TODO: generalise deployment process: make DOCKER_REGISTRY_SECRET and DOCKER_REGISTRY_SERVER configurable -->
64
+
Also, run the system tests with your local changes against a Kubernetes cluster:
65
+
-`make deploy-dev`
66
+
-`make system-tests`
67
+
24
68
## Pull Requests
25
69
26
70
RabbitMQ Operator project uses pull requests to discuss, collaborate on and accept code contributions.
@@ -40,6 +84,10 @@ Here's the recommended workflow:
40
84
If what you are going to work on is a substantial change, please first
41
85
ask the core team for their opinion on the [RabbitMQ users mailing list][rmq-users].
42
86
87
+
### Code Conventions
88
+
89
+
This project follows the [Kubernetes Code Conventions for Go](https://github.com/kubernetes/community/blob/master/contributors/guide/coding-conventions.md#code-conventions), which in turn mostly refer to [Effective Go](https://golang.org/doc/effective_go.html) and [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments). Please ensure your pull requests follow these guidelines.
90
+
43
91
## Code reviews
44
92
45
93
All submissions, including submissions by project members, require review. We
Manage [RabbitMQ](https://www.rabbitmq.com/) clusters deployed to [Kubernetes](https://kubernetes.io/). The RabbitMQ Cluster Kubernetes Operator has been built using the [Kubebuilder](https://github.com/kubernetes-sigs/kubebuilder) implementation of the [operator pattern](https://coreos.com/blog/introducing-operators.html). This repository contains a [custom controller](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#custom-controllers) and [custom resource definition (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) designed for the lifecyle (creation, upgrade, graceful shutdown) of a RabbitMQ cluster.
3
+
Kubernetes operator to deploy and manage [RabbitMQ](https://www.rabbitmq.com/) clusters. This repository contains a [custom controller](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#custom-controllers) and [custom resource definition (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) designed for the lifecyle (creation, upgrade, graceful shutdown) of a RabbitMQ cluster.
4
4
5
5
**Note**: this repository is under active development and is provided as **beta** software. Official support for this software is not provided; if you encounter any issues running this software, please feel free to [contribute to the project](#contributing).
6
6
7
-
## Supported Versions
8
-
9
-
The operator deploys RabbitMQ `3.8.8` by default, and supports versions from `3.8.4` upwards. The operator requires a Kubernetes cluster of `1.16` or above.
The easiest way to set up a local development environment for running the RabbitMQ operator is using [KinD](https://kind.sigs.k8s.io/):
15
+
Then you can deploy a RabbitMQ cluster:
24
16
25
-
1. Follow the KinD [installation guide](https://kind.sigs.k8s.io/#installation-and-usage) to deploy a Kubernetes cluster
26
-
1. Ensure that all [Required environment variables](#required-environment-variables) are set in your environment
27
-
1. Run `make deploy-kind`
28
-
1. Check that the operator is running by running `kubectl get all --namespace=rabbitmq-system`
29
-
1. Deploy a `RabbitmqCluster` custom resource. Refer to the [example YAML](./cr-example.yaml) and [documentation](https://docs.pivotal.io/rabbitmq-kubernetes/0-7/using.html#configure) for available CR attributes
30
-
1. Due to resource limitations on your Docker daemon, the Kubernetes might not be able to schedule all `RabbitmqCluster` nodes. Either [increase your Docker daemon's resource limits](https://docs.docker.com/docker-for-mac/#resources) or deploy the `RabbitmqCluster` custom resource with `resources: {}` to remove default `memory` and `cpu` resource settings.
31
-
1. If you set the `serviceType` to `LoadBalancer`, run `make kind-prepare` to deploy a [MetalLB](https://metallb.universe.tf/) load balancer. This will allow the operator to complete the `RabbitmqCluster` provisioning by assign an arbitrary local IP address to the cluster's client service. Proper [network configuration](https://metallb.universe.tf/installation/network-addons/) is required to route traffic via the assigned IP address.
@@ -46,54 +37,23 @@ In addition, a number of [examples](./docs/examples) can be found in this reposi
46
37
The doc guides are open source. The source can be found in the [RabbitMQ website repository](https://github.com/rabbitmq/rabbitmq-website/)
47
38
under `site/kubernetes`.
48
39
40
+
## Supported Versions
49
41
50
-
## Makefile
51
-
52
-
#### Required environment variables
53
-
54
-
- DOCKER_REGISTRY_SERVER: URL of docker registry containing the Operator image (e.g. `registry.my-company.com`)
55
-
- OPERATOR_IMAGE: path to the Operator image within the registry specified in DOCKER_REGISTRY_SERVER (e.g. `rabbitmq/cluster-operator`). Note: OPERATOR_IMAGE should **not** include a leading slash (`/`)
56
-
57
-
When running `make deploy-dev`, additionally:
42
+
The operator deploys RabbitMQ `3.8.8` by default, and supports versions from `3.8.4` upwards. The operator requires Kubernetes `1.16` or newer.
58
43
59
-
- DOCKER_REGISTRY_USERNAME: Username for accessing the docker registry
60
-
- DOCKER_REGISTRY_PASSWORD: Password for accessing the docker registry
61
-
- DOCKER_REGISTRY_SECRET: Name of Kubernetes secret in which to store the Docker registry username and password
on how we implement non-strict semver. The version number MAY or MAY NOT follow the semver rules. Hence, we highly recommend to read
50
+
the release notes to understand the changes and their potential impact for any release.
78
51
79
52
## Contributing
80
53
81
54
This project follows the typical GitHub pull request model. Before starting any work, please either comment on an [existing issue](https://github.com/rabbitmq/cluster-operator/issues), or file a new one.
82
55
83
-
### Testing
84
-
85
-
Before submitting a pull request, ensure all local tests pass:
86
-
-`make unit-tests`
87
-
-`make integration-tests`
88
-
89
-
<!-- TODO: generalise deployment process: make DOCKER_REGISTRY_SECRET and DOCKER_REGISTRY_SERVER configurable -->
90
-
Also, run the system tests with your local changes against a Kubernetes cluster:
91
-
-`make deploy-dev`
92
-
-`make system-tests`
93
-
94
-
### Code Conventions
95
-
96
-
This project follows the [Kubernetes Code Conventions for Go](https://github.com/kubernetes/community/blob/master/contributors/guide/coding-conventions.md#code-conventions), which in turn mostly refer to [Effective Go](https://golang.org/doc/effective_go.html) and [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments). Please ensure your pull requests follow these guidelines.
56
+
Please read [contribution guidelines](CONTRIBUTING.md) if you are interested in contributing to this project.
97
57
98
58
## License
99
59
@@ -102,4 +62,3 @@ This project follows the [Kubernetes Code Conventions for Go](https://github.com
0 commit comments