Giter VIP home page Giter VIP logo

kube-azure-servicebus-autoscaler's Introduction

kube-azure-servicebus-autoscaler

๐ŸŒŸ This project is a fork of kube-sqs-autoscaler

Kubernetes pod autoscaler based on queue size in Azure Service Bus Queues. It periodically retrieves the number of messages in your queue and scales pods accordingly.

Setting up

Setting up kube-azure-servicebus-autoscaler requires two steps:

  1. Adding Service Prinicipal credentials, subscription id and tenant id in Secrets so it can read the number of messages in your queues.
  2. Deploying it as an incluster service in your cluster

Deploying kube-azure-servicebus-autoscaler

Deploying kube-azure-servicebus-autoscaler should be as simple as applying this deployment:

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: kube-azure-servicebus-autoscaler
  labels:
    app: kube-azure-servicebus-autoscaler
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kube-azure-servicebus-autoscaler
  template:
    metadata:
      labels:
        app: kube-azure-servicebus-autoscaler
    spec:
      containers:
      - name: kube-azure-servicebus-autoscaler
        image: torosent/kube-azure-servicebus-autoscaler:1.0.0
        command:
          - /kube-azure-servicebus-autoscaler
          - --resourcegroup=queuerg  #required
          - --queuename=somequeuename  #required
          - --namespace=somenamespace  #required
          - --kubernetes-deployment=your-kubernetes-deployment-name # required
          - --kubernetes-namespace=$(POD_NAMESPACE) # optional
          - --poll-period=5s # optional
          - --scale-down-cool-down=30s # optional
          - --scale-up-cool-down=5m # optional
          - --scale-up-messages=100 # optional
          - --scale-down-messages=10 # optional
          - --max-pods=5 # optional
          - --min-pods=1 # optional
        env:
          - name: POD_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: AZURE_CLIENT_ID
            valueFrom:
              secretKeyRef:
                name: azureserviceprincipal
                key: clientid
          - name: AZURE_CLIENT_SECRET
            valueFrom:
              secretKeyRef:
                name: azureserviceprincipal
                key: clientsecret
          - name: AZURE_SUBSCRIPTION_ID
            valueFrom:
              secretKeyRef:
                name: azureserviceprincipal
                key: subscriptionid
          - name: AZURE_TENANT_ID
            valueFrom:
              secretKeyRef:
                name: azureserviceprincipal
                key: tenantid
        resources:
          requests:
            memory: "200Mi"
            cpu: "100m"
          limits:
            memory: "200Mi"
            cpu: "100m"
        volumeMounts:
          - name: ssl-certs
            mountPath: /etc/ssl/certs/ca-certificates.crt
            readOnly: true
      volumes:
        - name: ssl-certs
          hostPath:
            path: "/etc/ssl/certs/ca-certificates.crt"

kube-azure-servicebus-autoscaler's People

Contributors

jharlap avatar phylu avatar torosent avatar

Watchers

 avatar  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.