All Projects → XciD → k8s-rmq-autoscaler

XciD / k8s-rmq-autoscaler

Licence: MIT license
Kubernetes autoscaler for deployments that consume queue in RMQ

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to k8s-rmq-autoscaler

Operator
Kubernetes operator to manage installation, updation and uninstallation of tektoncd projects (pipeline, …)
Stars: ✭ 161 (+747.37%)
Mutual labels:  kubernetes-operator
Strimzi Kafka Operator
Apache Kafka running on Kubernetes
Stars: ✭ 2,833 (+14810.53%)
Mutual labels:  kubernetes-operator
ship-it
Wattpad's tool for continuously deploying code to Kubernetes quickly, safely, and observably.
Stars: ✭ 14 (-26.32%)
Mutual labels:  kubernetes-operator
Marmot
Marmot workflow execution engine
Stars: ✭ 174 (+815.79%)
Mutual labels:  kubernetes-operator
Cluster Operator
RabbitMQ Cluster Kubernetes Operator
Stars: ✭ 192 (+910.53%)
Mutual labels:  kubernetes-operator
Mongodb Enterprise Kubernetes
MongoDB Enterprise Kubernetes Operator
Stars: ✭ 232 (+1121.05%)
Mutual labels:  kubernetes-operator
Github Actions Runner Operator
K8S operator for scheduling github actions runner pods
Stars: ✭ 159 (+736.84%)
Mutual labels:  kubernetes-operator
kubegres
Kubegres is a Kubernetes operator allowing to deploy one or many clusters of PostgreSql instances and manage databases replication, failover and backup.
Stars: ✭ 1,107 (+5726.32%)
Mutual labels:  kubernetes-operator
Rbacsync
Automatically sync groups into Kubernetes RBAC
Stars: ✭ 197 (+936.84%)
Mutual labels:  kubernetes-operator
pulp-operator
Kubernetes Operator for Pulp 3. Under active development.
Stars: ✭ 32 (+68.42%)
Mutual labels:  kubernetes-operator
Operators
Collection of Kubernetes Operators built with KUDO.
Stars: ✭ 175 (+821.05%)
Mutual labels:  kubernetes-operator
Bonny
The Elixir based Kubernetes Development Framework
Stars: ✭ 190 (+900%)
Mutual labels:  kubernetes-operator
Percona Xtradb Cluster Operator
A Kubernetes Operator for Percona XtraDB Cluster
Stars: ✭ 230 (+1110.53%)
Mutual labels:  kubernetes-operator
Cronjobber
Cronjobber is a cronjob controller for Kubernetes with support for time zones
Stars: ✭ 169 (+789.47%)
Mutual labels:  kubernetes-operator
akrobateo
Akrobateo is a simple Kubernetes operator to expose in-cluster LoadBalancer services as node hostPorts using DaemonSets.
Stars: ✭ 111 (+484.21%)
Mutual labels:  kubernetes-operator
Kubestone
Performance benchmarks for Kubernetes
Stars: ✭ 159 (+736.84%)
Mutual labels:  kubernetes-operator
Cassandra Operator
Kubernetes operator for Apache Cassandra
Stars: ✭ 215 (+1031.58%)
Mutual labels:  kubernetes-operator
microcks-ansible-operator
Kubernetes Operator for easy setup and management of Microcks installs
Stars: ✭ 21 (+10.53%)
Mutual labels:  kubernetes-operator
nifi-stateless-operator
An Operator for scheduling and executing NiFi Flows as Jobs on Kubernetes
Stars: ✭ 52 (+173.68%)
Mutual labels:  kubernetes-operator
sops-operator
A Kubernetes operator for Mozilla SOPS
Stars: ✭ 23 (+21.05%)
Mutual labels:  kubernetes-operator

K8S RMQ Autoscaler

version Build Status Go Report Card codecov Pulls Layers Size

K8S Autoscaler is a Pod that will run in your k8s cluster and automatically:

  • watch for your deployments that match k8s-rmq-autoscaler annotations
  • watch rabbitmq for messages in queues and consumers
  • choose to scale up / down the deployment

K8s Configuration

Create the namespace

kubectl create namespace k8s-rmq-autoscaler

Create a secret with the RMQ Password

kubectl create secret generic rmq-credentials --from-literal=RMQ_PASSWORD=test -n k8s-rmq-autoscaler

Edit k8s-rmq-autoscaler.yml with your RMQ information and then you can apply the k8s configuration

See bellow for ENV configuration

kubectl apply -f k8s-rmq-autoscaler.yml

You can then watch the logs

kubectl logs -f pod/k8s-rmq-autoscaler -n k8s-rmq-autoscaler

Now we add annotations to a deployment

kubectl annotate deployment/your-deployment -n namespace \
    k8s-rmq-autoscaler/enable=true \ 
    k8s-rmq-autoscaler/max-workers=20 \ 
    k8s-rmq-autoscaler/min-workers=4 \ 
    k8s-rmq-autoscaler/queue=worker-queue \ 
    k8s-rmq-autoscaler/vhost=vhost

Now your deployment is watched by the autoscaler

Annotations

Config Mandatory Description
enable true enable the autoscaling on this deployment
max-workers true the maximum amount of worker to scale up
min-workers true the minimum amount of worker to scale down
queue true RMQ queue to watch
vhost true RMQ vhost where the queue can be found
messages-per-worker false Default: 1, set the number of message per worker
cooldown-delay false Default: 0s, How long the autoscaler has to wait before another downscale operation can be performed after the current one has completed. (Duration: 5m0s)
steps false Default: 1, How many workers will be scale up/down if needed
offset false Default: 0, The offset will be added if you always want more workers than message in queue. For example, if you set 1 on offset, you will always have 1 worker more than messages
override false Default: false, Authorize the user to scale more than the max/min limits manually
safe-unscale false Default: true, Forbid the scaler to scale down when you still have message in queue. Used to avoid to unscale a worker that is processing a message

Environnement config

Config Description
RMQ_USER RMQ Username used for authentication with the RabbitMQ API
RMQ_PASSWORD RMQ Password used for authentication with the RabbitMQ API
RMQ_URL RMQ URL with scheme (Ex. https://rmq:15772)
IN_CLUSTER Boolean that indicate if your are inside the cluster or not (default true)
NAMESPACES namespaces to watch separated by commas, (default, watching all namespaces)
TICK Seconds between checks for autoscaling process (default 10)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].