gcp-filestore-csi-driver

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2019 License: Apache-2.0

README

gcp-filestore-csi-driver

Google Cloud Filestore CSI driver for use in Kubernetes and other container orchestrators.

Disclaimer: This is not an officially supported Google product.

Project Overview

This driver allows volumes backed by Google Cloud Filestore instances to be dynamically created and mounted by workloads.

If multiple volumes are not needed, then Google Cloud Filestore instances can be manually created without this CSI driver and mounted using existing NFS volume plugins. Please see the Cloud Filestore documentation for more details.

Project Status

Status: Alpha

Latest image: gcr.io/google-containers/volume-csi/gcp-filestore-csi-driver:v0.2.0

Also see known issues and CHANGELOG.

CSI Compatibility

This plugin is compatible with CSI version 0.2.0 and 0.3.0.

Kubernetes Compatibility
Filestore CSI Driver\Kubernetes Version 1.10.5-1.11 1.12 1.13 1.14
v0.1.0 (alpha) yes no no no
v0.2.0 (alpha) no yes yes yes
dev no yes yes yes

Plugin Features

Supported CreateVolume parameters

This version of the driver creates a new Cloud Filestore instance per volume. Customizable parameters for volume creation include:

Parameter Values Default Description
tier "standard"
"premium"
"standard" storage performance tier
network string "default" VPC name
location string zone where the plugin
is running in
zone
reserved-ipv4-cidr string "" CIDR range to allocate Filestore IP Ranges from.
The CIDR must be large enough to accommodate multiple Filestore IP Ranges of /29 each

For Kubernetes clusters, these parameters are specified in the StorageClass.

Note that non-default networks require extra firewall setup

Future Features

  • Non-root access: By default, GCFS instances are only writable by the root user and readable by all users. Provide a CreateVolume parameter to set non-root owners.
  • Subdirectory provisioning: Given an existing Cloud Filestore instance, provision a subdirectory as a volume. This provisioning mode does not provide capacity isolation. Quota support needs investigation. For now, the nfs-client external provisioner can be used to provide similar functionality for Kubernetes clusters.
  • Volume resizing: CSI does not have volume resizing support yet, but Cloud Filestore instances can currently be manually resized.
  • Topology preferences: For better performance, it is recommended to run workloads in the same zone where the Cloud Filestore instance is provisioned in. In the future, the location where to create a Cloud Filestore instance could be automatically influenced by where the workload is scheduled.

Kubernetes User Guide

  1. One-time per project: Create GCP service account for the CSI driver and set the Cloud Filestore editor role.
# Optionally set a different directory to download the service account token.
# Default is $HOME.
# GCFS_SA_DIR=/another/directory
./deploy/project_setup.sh
  1. Deploy driver to Kubernetes cluster
./deploy/kubernetes/cluster_setup.sh
./deploy/kubernetes/driver_start.sh
  1. Create example StorageClass
kubectl apply -f ./examples/kubernetes/demo-sc.yaml
  1. Create example PVC and Pod
kubectl apply -f ./examples/kubernetes/demo-pod.yaml

Kubernetes Development

Setup GCP service account first and setup Kubernetes cluster

$ ./deploy/project_setup.sh
$ ./deploy/kubernetes/cluster_setup.sh
Manual
$ make
$ make push
# Modify manifests under deploy/kubernetes/manifests to use development image
$ ./deploy/kubernetes/driver_start.sh
Automatic using Skaffold and Kustomize
  1. Modify Skaffold configuration and Kustomize overlays with your image registry
  2. Run skaffold
$ make skaffold-dev
Dependency Management

Use dep

$ dep ensure

Directories

Path Synopsis
pkg
cloud_provider/generated/file/v1beta1
Package file provides access to the Cloud Filestore API.
Package file provides access to the Cloud Filestore API.
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL