Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Repository files navigation

yandex-csi-driver

A Container Storage Interface (CSI) Driver for Yandex Compute Disks.

Releases

The Yandex CSI driver follows semantic versioning. The version will be bumped following the rules below:

  • Bug fixes will be released as a PATCH update.
  • New features (such as CSI spec bumps with no breaking changes) will be released as a MINOR update.
  • Significant breaking changes makes a MAJOR update.

Features

Below is a list of functionality implemented by the plugin.

Volume Expansion

Volumes can be expanded by updating the storage request value of the corresponding PVC:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: csi-pvc
  namespace: default
spec:
  [...]
  resources:
    requests:
      # The field below can be increased.
      storage: 10Gi
      [...]

After successful expansion, the status section of the PVC object will reflect the actual volume capacity.

Important notes:

  • Since Yandex.Cloud Compute Disks do not support online resize yet, after resizing a PVC object you have to manually delete a Pod object so that a Disk detaches from Instance, allowing to resize itself.
  • Volumes can only be increased in size, not decreased; attempts to do so will lead to an error.
  • Expanding a volume that is larger than the target size will have no effect. The PVC object status section will continue to represent the actual volume capacity.
  • Resizing volumes other than through the PVC object (e.g., the DigitalOcean cloud control panel) is not recommended as this can potentially cause conflicts. Additionally, size updates will not be reflected in the PVC object status section immediately, and the section will eventually show the actual volume capacity.

Disk Block Size

The block size of a disk can optionally be set with the blockSize StorageClass parameter. The value is either a plain number of bytes (8192) or a number with a binary kilobyte suffix (8K, 8Ki, 8KiB). Allowed values are powers of two from 4 KiB to 128 KiB, as described in the Yandex.Cloud documentation. When the parameter is omitted, the Yandex.Cloud default of 4 KiB is used.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: yc-network-ssd-64k
provisioner: yandex.csi.flant.com
parameters:
  typeID: network-ssd
  blockSize: 64Ki
allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer

The block size defines the maximum size of a network disk: 8 TiB for the default 4 KiB block, and twice as much for every next block size, up to 256 TiB for a 128 KiB block. The block size cannot be changed after a disk is created.

Volume Statistics

Volume statistics are exposed through the CSI-conformant endpoints. Monitoring systems such as Prometheus can scrape metrics and provide insights into volume usage.

Installing to Kubernetes

Kubernetes Compatibility

yandex-csi-driver is supported in Kubernetes >=1.15 only.

Requirements:

  • --allow-privileged flag must be set to true for both the API server and the kubelet
  • --feature-gates=VolumeSnapshotDataSource=true,CSINodeInfo=true,CSIDriverRegistry=true feature gate flags must be set to true for both the API server and the kubelet
  • Mount Propagation needs to be enabled. If you use Docker, the Docker daemon of the cluster nodes must allow shared mounts.

Installing driver

Simply install everyhting from the deploy path. Be sure to replace:

About

A Container Storage Interface (CSI) Driver for Yandex.Cloud Compute Disks

Topics

Resources

Stars

99 stars

Watchers

32 watching

Forks

Releases

Packages

Used by

Contributors

Languages