csi

package
v1.1.31 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

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

View Source
const (
	EdgefsNfsDriverName   = "io.edgefs.csi.nfs"
	EdgefsIscsiDriverName = "io.edgefs.csi.iscsi"
)

Variables

View Source
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=..."

View Source
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=..."

DriverTypes - list of the available driver types

Roles - list of the driver roles

View Source
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 Args

type Args struct {
	Role       Role
	DriverType DriverType
	NodeID     string
	Endpoint   string
	Logger     *logrus.Entry
}

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

func NewDriver

func NewDriver(args Args) (*Driver, error)

func (*Driver) Run

func (d *Driver) Run() error

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

GetPluginCapabilities - get plugin capabilities

func (*IdentityServer) GetPluginInfo

GetPluginInfo - return plugin info

func (*IdentityServer) Probe

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 ParseRole

func ParseRole(from string) (Role, error)

ParseRole - create role from user input

func (Role) IsController

func (r Role) IsController() bool

IsController - is this a controller role

func (Role) IsNode

func (r Role) IsNode() bool

IsNode - is this a node role

func (Role) String

func (r Role) String() string

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.

Jump to

Keyboard shortcuts

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