v1

package
v2.8.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PVCLabelsApplication         = "volumeprovisioner.mapi.openebs.io/application"
	PVCLabelsReplicaTopKeyDomain = "volumeprovisioner.mapi.openebs.io/replica-topology-key-domain"
	PVCLabelsReplicaTopKeyType   = "volumeprovisioner.mapi.openebs.io/replica-topology-key-type"
)

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(envKey ENVKey) string

GetEnv fetches the environment variable value from the machine's environment

func K8sMasterENV

func K8sMasterENV() string

func KubeConfigENV

func KubeConfigENV() string

Types

type ENVKey

type ENVKey string
const (
	// KubeConfigENVK is the ENV key to fetch the kubeconfig
	KubeConfigENVK ENVKey = "OPENEBS_IO_KUBE_CONFIG"

	// K8sMasterENVK is the ENV key to fetch the K8s Master's Address
	K8sMasterENVK ENVKey = "OPENEBS_IO_K8S_MASTER"
)

type SnapshotAPISpec

type SnapshotAPISpec struct {
	Kind       string `yaml:"kind"`
	APIVersion string `yaml:"apiVersion"`
	Metadata   struct {
		Name string `yaml:"name"`
	} `yaml:"metadata"`
	Spec struct {
		VolumeName string `yaml:"volumeName"`
	} `yaml:"spec"`
}

SnapshotAPISpec hsolds the config for creating asnapshot of volume

type Volume

type Volume struct {
	Spec struct {
		AccessModes interface{} `json:"AccessModes"`
		Capacity    interface{} `json:"Capacity"`
		ClaimRef    interface{} `json:"ClaimRef"`
		OpenEBS     struct {
			VolumeID string `json:"volumeID"`
		} `json:"OpenEBS"`
		PersistentVolumeReclaimPolicy string `json:"PersistentVolumeReclaimPolicy"`
		StorageClassName              string `json:"StorageClassName"`
	} `json:"Spec"`

	Status struct {
		Message string `json:"Message"`
		Phase   string `json:"Phase"`
		Reason  string `json:"Reason"`
	} `json:"Status"`
	Metadata struct {
		Annotations       interface{} `json:"annotations"`
		CreationTimestamp interface{} `json:"creationTimestamp"`
		Name              string      `json:"name"`
	} `json:"metadata"`
}

Volume is a command implementation struct

type VolumeClone

type VolumeClone struct {
	// Defaults to false, true will enable the volume to be created as a clone
	Clone bool `yaml:"clone,omitempty"`
	// SourceVolume is snapshotted volume
	SourceVolume string `yaml:"sourceVolume,omitempty"`
	// CloneIP is the source controller IP which will be used to make a sync and rebuild
	// request from the new clone replica.
	CloneIP string `yaml:"cloneIP,omitempty"`
	// SnapshotName name of snapshot which is getting promoted as persistent
	// volume(this snapshot will be cloned to new volume).
	SnapshotName string `yaml:"snapshotName,omitempty"`
}

type VolumeSpec

type VolumeSpec struct {
	Kind       string `yaml:"kind"`
	APIVersion string `yaml:"apiVersion"`
	Metadata   struct {
		Name   string `yaml:"name"`
		Labels struct {
			Storage               string `yaml:"volumeprovisioner.mapi.openebs.io/storage-size"`
			StorageClass          string `yaml:"k8s.io/storage-class"`
			Namespace             string `yaml:"k8s.io/namespace"`
			PersistentVolumeClaim string `yaml:"k8s.io/pvc"`
			Application           string `yaml:"volumeprovisioner.mapi.openebs.io/application,omitempty"`
			ReplicaTopoKeyDomain  string `yaml:"volumeprovisioner.mapi.openebs.io/replica-topology-key-domain,omitempty"`
			ReplicaTopoKeyType    string `yaml:"volumeprovisioner.mapi.openebs.io/replica-topology-key-type,omitempty"`
		} `yaml:"labels"`
	} `yaml:"metadata"`
	VolumeClone `yaml:"volumeClone"`
}

VolumeSpec holds the config for creating a OpenEBS Volume

Jump to

Keyboard shortcuts

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