- Notifications
You must be signed in to change notification settings - Fork25
Container Storage Interface (CSI) plugin for Apache CloudStack
License
apalia/cloudstack-csi-driver
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository provides aContainer Storage Interface (CSI)plugin forApache CloudStack.
Minimal Kubernetes version: v1.17
The Kubernetes cluster must run in CloudStack. Tested only in a KVM zone.
A disk offering with custom size must be available, with type "shared".
In order to match the Kubernetes node and the CloudStack instance,they should both have the same name. If not, it is also possible to usecloud-init instance metadatato get the instance name: if the node has cloud-init enabled, metadata willbe available in
/run/cloud-init/instance-data.json
; you should then makesure that/run/cloud-init/
is mounted from the node.Kubernetes nodes must be in the Root domain, and be created by the CloudStackaccount whose credentials are used inconfiguration.
Create the CloudStack configuration filecloud-config
.
It should have the following format, defined for theCloudStack Kubernetes Provider:
[Global]api-url = <CloudStack API URL>api-key = <CloudStack API Key>secret-key = <CloudStack API Secret>ssl-no-verify = <Disable SSL certificate validation: true or false (optional)>
Create a secret namedcloudstack-secret
in namespacekube-system
:
kubectl create secret generic \ --namespace kube-system \ --from-file ./cloud-config \ cloudstack-secret
If you have also deployed theCloudStack Kubernetes Provider,you may use the same secret for both tools.
kubectl apply -f https://github.com/apalia/cloudstack-csi-driver/releases/latest/download/manifest.yaml
A storage class can be created manually: seeexample.
Theprovisioner
value must becsi.cloudstack.apache.org
.
ThevolumeBindingMode
must beWaitForFirstConsumer
, in order to delay thebinding and provisioning of a PersistentVolume until a Pod using thePersistentVolumeClaim is created. It enables the provisioning of volumesin respect to topology constraints (e.g. volume in the right zone).
The storage class must also have a parameter namedcsi.cloudstack.apache.org/disk-offering-id
whose value is the CloudStack diskoffering ID.
The toolcloudstack-csi-sc-syncer
may also be used to synchronize CloudStackdisk offerings to Kubernetes storage classes.
Example:
kubectl apply -f ./examples/k8s/pvc.yamlkubectl apply -f ./examples/k8s/pod.yaml
To build the driver binary:
make build-cloudstack-csi-driver
To build the container images:
make container
- CloudStack Kubernetes Provider - Kubernetes Cloud Controller Manager for Apache CloudStack
- CloudStack documentation on storage
- CSI (Container Storage Interface) specification
Copyright 2021 Apalia SASLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
About
Container Storage Interface (CSI) plugin for Apache CloudStack
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.