Documentation ¶
Overview ¶
* Copyright (c) 2015-2018 Nexenta Systems, Inc. * * This file is part of EdgeFS Project * (see https://github.com/Nexenta/edgefs). * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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.
Index ¶
- Constants
- Variables
- func NewControllerServer(d *Driver) (csi.ControllerServer, error)
- func NewNodeServer(d *Driver) (csi.NodeServer, error)
- type Args
- type Driver
- type DriverType
- type IdentityServer
- func (ids *IdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (ids *IdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (ids *IdentityServer) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- type Role
Constants ¶
const ( EdgefsNfsDriverName = "io.edgefs.csi.nfs" EdgefsIscsiDriverName = "io.edgefs.csi.iscsi" )
Variables ¶
var Commit string
Commit - driver last commit, to set commit set flags: go build -ldflags "-X github.com/Nexenta/edgefs/src/csi/edgefs-csi/csi.Commit=..."
var DateTime string
DateTime - driver build datetime, to set commit set flags: go build -ldflags "-X github.com/Nexenta/edgefs/src/csi/edgefs-csi/csi.DateTime=..."
var DriverTypes = []DriverType{DriverTypeNFS, DriverTypeISCSI}
DriverTypes - list of the available driver types
var Roles = []Role{RoleAll, RoleController, RoleNode}
Roles - list of the driver roles
var Version string
Version - driver version, to set version set flags: go build -ldflags "-X github.com/Nexenta/edgefs/src/csi/edgefs-csi/csi.Version=0.0.1"
Functions ¶
func NewControllerServer ¶
func NewControllerServer(d *Driver) (csi.ControllerServer, error)
NewControllerServer created commin controller server
func NewNodeServer ¶
func NewNodeServer(d *Driver) (csi.NodeServer, error)
NewNodeServer creates new default Node server
Types ¶
type DriverType ¶
type DriverType string
DriverType - type of edgefs driver to create [nfs|iscsi]
const ( DriverTypeNFS DriverType = "nfs" DriverTypeISCSI DriverType = "iscsi" )
func ParseDriverType ¶
func ParseDriverType(from string) (DriverType, error)
ParseDriverType - create DriverType from user input
func (DriverType) String ¶
func (r DriverType) String() string
type IdentityServer ¶
type IdentityServer struct {
// contains filtered or unexported fields
}
IdentityServer - k8s csi driver identity server
func NewIdentityServer ¶
func NewIdentityServer(driver *Driver) *IdentityServer
NewIdentityServer - create an instance of identity server
func (*IdentityServer) GetPluginCapabilities ¶
func (ids *IdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) ( *csi.GetPluginCapabilitiesResponse, error, )
GetPluginCapabilities - get plugin capabilities
func (*IdentityServer) GetPluginInfo ¶
func (ids *IdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) ( *csi.GetPluginInfoResponse, error, )
GetPluginInfo - return plugin info
func (*IdentityServer) Probe ¶
func (ids *IdentityServer) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
Probe - return driver status (ready or not)
type Role ¶
type Role string
Role - role of this instance of driver
const ( // RoleAll - run driver as both controller and node instance RoleAll Role = "all" // RoleController - run driver as a controller instance (Identity server + Controller server) // This role should be used with: // - "csi-provisioner" sidecar container that watches Kubernetes PersistentVolumeClaim objects // and triggers CreateVolume/DeleteVolume against a CSI endpoint // - "csi-attacher" sidecar container that watches Kubernetes VolumeAttachment objects // and triggers ControllerPublish/Unpublish against a CSI endpoint RoleController Role = "controller" // RoleNode - to run driver as a node instance (Identity server + Node server), runs on each K8s node // This role should be used with "driver-registrar", sidecar container that: // 1) registers the CSI driver with kubelet // 2) adds the drivers custom NodeId to a label on the Kubernetes Node API Object RoleNode Role = "node" )
func (Role) IsController ¶
IsController - is this a controller role
Directories ¶
Path | Synopsis |
---|---|
drivers
|
|
iscsi
* Copyright (c) 2015-2018 Nexenta Systems, Inc.
|
* Copyright (c) 2015-2018 Nexenta Systems, Inc. |
nfs
* Copyright (c) 2015-2018 Nexenta Systems, Inc.
|
* Copyright (c) 2015-2018 Nexenta Systems, Inc. |
* Copyright (c) 2015-2018 Nexenta Systems, Inc.
|
* Copyright (c) 2015-2018 Nexenta Systems, Inc. |