Coder Social home page Coder Social logo

yuu-yuki / cluster-operator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rabbitmq/cluster-operator

0.0 0.0 0.0 10.4 MB

RabbitMQ Cluster Kubernetes Operator

Home Page: https://www.rabbitmq.com/kubernetes/operator/operator-overview.html

License: Mozilla Public License 2.0

Dockerfile 0.26% Makefile 1.99% Go 95.33% Shell 2.41%

cluster-operator's Introduction

RabbitMQ Cluster Kubernetes Operator

Manage RabbitMQ clusters deployed to Kubernetes. The RabbitMQ Cluster Kubernetes Operator has been built using the Kubebuilder implementation of the operator pattern. This repository contains a custom controller and custom resource definition (CRD) designed for the lifecyle (creation, upgrade, graceful shutdown) of a RabbitMQ cluster.

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.

Supported Versions

The operator deploys RabbitMQ 3.8.8, and requires a Kubernetes cluster of 1.16 or above.

Versioning

RabbitMQ Cluster Kubernetes Operator follows non-strict semver.

The versioning guidelines document contains guidelines on how we implement non-strict semver. The version number MAY or MAY NOT follow the semver rules. Hence, we highly recommend to read the release notes to understand the changes and their potential impact for any release.

Quickstart

Deploying on KinD

The easiest way to set up a local development environment for running the RabbitMQ operator is using KinD:

  1. Follow the KinD installation guide to deploy a Kubernetes cluster
  2. Ensure that all Required environment variables are set in your environment
  3. Run make deploy-kind
  4. Check that the operator is running by running kubectl get all --namespace=rabbitmq-system
  5. Deploy a RabbitmqCluster custom resource. Refer to the example YAML and documentation for available CR attributes
    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 or deploy the RabbitmqCluster custom resource with resources: {} to remove default memory and cpu resource settings.
    2. If you set the serviceType to LoadBalancer, run make kind-prepare to deploy a MetalLB 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 is required to route traffic via the assigned IP address.

Documentation

RabbitMQ Cluster Kubernetes Operator is covered by several guides:

In addition, a number of examples can be found in this repository.

The doc guides are open source. The source can be found in the RabbitMQ website repository under site/kubernetes.

Makefile

Required environment variables

  • DOCKER_REGISTRY_SERVER: URL of docker registry containing the Operator image (e.g. registry.my-company.com)
  • 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 (/)

When running make deploy-dev, additionally:

  • DOCKER_REGISTRY_USERNAME: Username for accessing the docker registry
  • DOCKER_REGISTRY_PASSWORD: Password for accessing the docker registry
  • DOCKER_REGISTRY_SECRET: Name of Kubernetes secret in which to store the Docker registry username and password

Make targets

  • controller-gen Download controller-gen if not in $PATH
  • deploy Deploy operator in the configured Kubernetes cluster in ~/.kube/config
  • deploy-dev Deploy operator in the configured Kubernetes cluster in ~/.kube/config, with local changes
  • deploy-kind Load operator image and deploy operator into current KinD cluster
  • deploy-sample Deploy RabbitmqCluster defined in config/sample/base
  • destroy Cleanup all operator artefacts
  • kind-prepare Prepare KinD to support LoadBalancer services, and local-path StorageClass
  • kind-unprepare Remove KinD support for LoadBalancer services, and local-path StorageClass
  • list List Makefile targets
  • run Run operator binary locally against the configured Kubernetes cluster in ~/.kube/config
  • unit-tests Run unit tests
  • integration-tests Run integration tests
  • system-tests Run end-to-end tests against Kubernetes cluster defined in ~/.kube/config

Contributing

This project follows the typical GitHub pull request model. Before starting any work, please either comment on an existing issue, or file a new one.

Testing

Before submitting a pull request, ensure all local tests pass:

  • make unit-tests
  • make integration-tests

Also, run the system tests with your local changes against a Kubernetes cluster:

  • make deploy-dev
  • make system-tests

Code Conventions

This project follows the Kubernetes Code Conventions for Go, which in turn mostly refer to Effective Go and Go Code Review Comments. Please ensure your pull requests follow these guidelines.

License

Licensed under the MPL, same as RabbitMQ server.

Copyright

Copyright 2020 VMware, Inc. All Rights Reserved.

cluster-operator's People

Contributors

chunyilyu avatar zerpet avatar mkuratczyk avatar ferozjilla avatar ansd avatar coro avatar st3v avatar gerhard avatar jrmcneil avatar harshac avatar dependabot[bot] avatar j4mcs avatar mirahimage avatar michaelklishin avatar acogoluegnes avatar ilaleksin avatar chewymeister avatar lukebakken avatar cholick avatar samnela avatar snneji avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.