Coder Social home page Coder Social logo

deveshs23 / dynamic-pv-scaler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from opstree/dynamic-pv-scaler

0.0 1.0 0.0 251 KB

A golang based Kubernetes application which can scale volume dynamically

License: Apache License 2.0

Dockerfile 3.02% Makefile 4.01% Go 92.97%

dynamic-pv-scaler's Introduction

Go Report Card Docker Repository on Quay Apache License

Dynamic PV(Persistent Volume) Scaler

A golang based Kubernetes application which has been created to overcome the scaling issue of Persistent Volume in Kubernetes. This can scale the Persistent Volume on the basis of threshold which you have set.

Getting Started

Architecture

Pre-requisites

Sorry none of these pre-requisites can be compromised. So you guys have to meet these requirements ๐Ÿ™‚

  • Kubernetes cluster version should be greater than 1.11+
  • Prometheus should be have the information of Persistent Volume
  • In storageclass, allowVolumeExpansion flag should be true

Example:-

---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: standard
provisioner: kubernetes.io/aws-ebs
parameters:
  type: gp2
reclaimPolicy: Retain
allowVolumeExpansion: true # This should be true for every storage class
mountOptions:
  - debug
volumeBindingMode: Immediate

That's it

Configuration

We are using helm to maintain the deployment and release in Kubernetes cluster. Hit Me. But for configuration part this application accepts a yaml file .config.yaml:

---
- namespace: database
  scale_percentage: 50
  threshold_percentage: 80
  pvc_name: data-mysql-0

Configuration file overview:-

Field Default Value Possible Values Description
namespace - Any valid k8s namespace Persistent Volume's namespace which needs to be watched
scale_percentage - Any integer How much percent you want to scale your pv
threshold_percentage - Any integer The target percentage after which you want to scale the pv
pvc_name - Any valid k8s pvc name Name of the pvc which you want to scale

Make sure you have updated the configuration in values.yaml.

Installation

Simply use the helm chart to install it on your flavor of Kubernetes.

# Deploy the PV Scaler
helm upgrade dynamic-pv-scaler ./deploy/helm --install --namespace dynamic-pv-scaler

Verify the installation

helm test dynamic-pv-scaler --namespace dynamic-pv-scaler
kubectl get pods -n dynamic-pv-scaler

Logging

The application's logging interface is designed to print logs in JSON stdout. Example logs:-

Development

Please see our development documentation for details.

Release

Please see our release documentation for details.

Contact

If you have any suggestion or query. Contact us at

[email protected]

dynamic-pv-scaler's People

Contributors

iamabhishek-dubey avatar

Watchers

James Cloos 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.