feat(zfs-localpv): initial commit

provisioning and deprovisioning of
the volumes on the node where zfs pool
has already been setup. Pool name and the volume
parameters has to be given in storage class
which will be used to provision the volume.

Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
Pawan 2019-09-12 12:32:17 +05:30 committed by Kiran Mova
parent 485e2a21f0
commit 9f5cf445df
46 changed files with 6339 additions and 0 deletions

51
pkg/config/config.go Normal file
View file

@ -0,0 +1,51 @@
/*
Copyright © 2019 The OpenEBS Authors
Licensed 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.0
Unless required by applicable law or agreed to in writing, software
distributed 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 and
limitations under the License.
*/
package config
// Config struct fills the parameters of request or user input
type Config struct {
// DriverName to be registered at CSI
DriverName string
// PluginType flags if the driver is
// it is a node plugin or controller
// plugin
PluginType string
// Version of the CSI controller/node driver
Version string
// Endpoint on which requests are made by kubelet
// or external provisioner
//
// NOTE:
// - Controller/node plugin will listen on this
// - This will be a unix based socket
Endpoint string
// NodeID helps in differentiating the nodes on
// which node drivers are running. This is useful
// in case of topologies and publishing or
// unpublishing volumes on nodes
NodeID string
}
// Default returns a new instance of config
// required to initialize a driver instance
func Default() *Config {
return &Config{}
}