All Projects → topolvm → pvc-autoresizer

topolvm / pvc-autoresizer

Licence: Apache-2.0 License
Auto-resize PersistentVolumeClaim objects based on Prometheus metrics

Programming Languages

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

Projects that are alternatives of or similar to pvc-autoresizer

linode-blockstorage-csi-driver
Container Storage Interface (CSI) Driver for Linode Block Storage
Stars: ✭ 50 (-59.68%)
Mutual labels:  storage, pvc
incache
Powerful key/value in-memory storage or on disk to persist data
Stars: ✭ 16 (-87.1%)
Mutual labels:  storage
carrierwave-dropbox
Carrierwave storage for Dropbox
Stars: ✭ 67 (-45.97%)
Mutual labels:  storage
snowfs
SnowFS - a fast, scalable version control file storage for graphic files 🎨
Stars: ✭ 1,101 (+787.9%)
Mutual labels:  storage
file-storage-system
一个基于 Go 语言实现的分布式云存储服务,慕课网实战仿百度网盘项目。
Stars: ✭ 149 (+20.16%)
Mutual labels:  storage
PhantasmaChain
Blockchain with native storage and smart contract integration.
Stars: ✭ 74 (-40.32%)
Mutual labels:  storage
PETPVC
Partial Volume Correction in PET
Stars: ✭ 29 (-76.61%)
Mutual labels:  pvc
todo-list
TodoList using Ionic2/3 & Firebase: * PWA * SSO Google plus. * Share list via QRcode. * Upload image from Camera or Storage. * Speech Recognition.
Stars: ✭ 18 (-85.48%)
Mutual labels:  storage
persistence
💾 Persistence provides a pretty easy API to handle Storage's implementations.
Stars: ✭ 18 (-85.48%)
Mutual labels:  storage
web
realness.online
Stars: ✭ 15 (-87.9%)
Mutual labels:  storage
xayah
WEB文件管理器
Stars: ✭ 19 (-84.68%)
Mutual labels:  storage
xfsvol
Local Docker Volumes with XFS Project Quota
Stars: ✭ 24 (-80.65%)
Mutual labels:  storage
taucmdr
Performance engineering for the rest of us.
Stars: ✭ 26 (-79.03%)
Mutual labels:  storage
S4
S4 is 100% S3 compatible storage, accessed through Tor and distributed using IPFS.
Stars: ✭ 67 (-45.97%)
Mutual labels:  storage
syncr
A rolling, append-only, local and remote data stream library for Go
Stars: ✭ 16 (-87.1%)
Mutual labels:  storage
storage
Go library providing common interface for working across multiple cloud storage backends
Stars: ✭ 154 (+24.19%)
Mutual labels:  storage
infinitree
Scalable and encrypted embedded database with 3-tier caching
Stars: ✭ 80 (-35.48%)
Mutual labels:  storage
localstorage-ponyfill
Universal LocalStorage for browser and Node.js.
Stars: ✭ 52 (-58.06%)
Mutual labels:  storage
Less3
Less3 is an S3-compatible object storage server that runs on your laptop, servers, just about anywhere!
Stars: ✭ 16 (-87.1%)
Mutual labels:  storage
vue-web-storage
Vue.js plugin for local storage and session storage (1.8 kb min+gz) 💾
Stars: ✭ 85 (-31.45%)
Mutual labels:  storage

GitHub release Main PkgGoDev Go Report Card

pvc-autoresizer

pvc-autoresizer resizes PersistentVolumeClaims (PVCs) when the free amount of storage is below the threshold. It queries the volume usage metrics from Prometheus that collects metrics from kubelet.

Status: beta

Supported environments

  • Kubernetes: 1.23, 1.22, 1.21

Target CSI Drivers

pvc-autoresizer supports CSI Drivers that meet the following requirements:

Prepare

pvc-autoresizer behaves based on the metrics that prometheus collects from kubelet.

Please refer to the following pages to set up Prometheus:

In addition, configure scraping as follows:

Installation

Specify the Prometheus URL to pvc-autoresizer argument as --prometheus-url.

pvc-autoresizer can be deployed to a Kubernetes cluster via helm:

helm install --create-namespace --namespace pvc-autoresizer pvc-autoresizer pvc-autoresizer/pvc-autoresizer --set "controller.args.prometheusURL=<YOUR PROMETHEUS ENDPOINT>"

See the Chart README.md for detailed documentation on the Helm Chart.

How to use

To allow auto volume expansion, the StorageClass of PVC need to allow volume expansion and have resize.topolvm.io/enabled: "true" annotation. The annotation may be omitted if you give --no-annotation-check command-line flag to pvc-autoresizer executable.

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: topolvm-provisioner
  annotations:
    resize.topolvm.io/enabled: "true"
provisioner: topolvm.cybozu.com
allowVolumeExpansion: true

To allow auto volume expansion, the PVC to be resized need to specify the upper limit of volume size with the annotation resize.topolvm.io/storage_limit. The PVC must have volumeMode: Filesystem too. You can also set the upper limit of volume size with .spec.resources.limits.storage, but it is deprecated. If both are present, the annotation takes precedence.

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: topolvm-pvc
  namespace: default
  annotations:
    resize.topolvm.io/storage_limit: 100Gi
spec:
  accessModes:
  - ReadWriteOnce
  volumeMode: Filesystem
  resources:
    requests:
      storage: 30Gi
  storageClassName: topolvm-provisioner

The PVC can optionally have resize.topolvm.io/threshold and resize.topolvm.io/increase annotations. (If they are not given, the default value is 10%.)

When the amount of free space of the volume is below resize.topolvm.io/threshold, .spec.resources.requests.storage is increased by resize.topolvm.io/increase.

If resize.topolvm.io/increase is given as a percentage, the value is calculated as the current spec.resources.requests.storage value multiplied by the annotation value.

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: topolvm-pvc
  namespace: default
  annotations:
    resize.topolvm.io/storage_limit: 100Gi
    resize.topolvm.io/threshold: 20%
    resize.topolvm.io/increase: 20Gi
spec:
  <snip>

Container images

Container images are available on Quay.io

Prometheus metrics

pvcautoresizer_kubernetes_client_fail_total

pvcautoresizer_kubernetes_client_fail_total is a counter that indicates how many API requests to kube-api server are failed.

pvcautoresizer_metrics_client_fail_total

pvcautoresizer_metrics_client_fail_total is a counter that indicates how many API requests to metrics server(e.g. prometheus) are failed.

pvcautoresizer_loop_seconds_total

pvcautoresizer_loop_seconds_total is a counter that indicates the sum of seconds spent on volume expansion processing loops.

pvcautoresizer_success_resize_total

pvcautoresizer_success_resize_total is a counter that indicates how many volume expansion processing resizes succeed.

pvcautoresizer_failed_resize_total

pvcautoresizer_failed_resize_total is a counter that indicates how many volume expansion processing resizes fail.

pvcautoresizer_limit_reached_total

pvcautoresizer_limit_reached_total is a counter that indicates how many storage limit was reached.

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