target

package
v0.0.0-...-3f1f3ec Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultContainerMaxCapacity - max allowed container disks capacity, if exeeded then new new container will be added
	DefaultContainerMaxCapacity = "132Ti"
	S3PayloadSecretsPath        = "/opt/nedge/etc/secrets/"
)

Variables

This section is empty.

Functions

func CreateQualifiedHeadlessServiceName

func CreateQualifiedHeadlessServiceName(replicaNum int, namespace string) string

CreateQualifiedHeadlessServiceName creates a qualified name of the headless service for a given replica id and namespace, e.g., edgefs-0.edgefs.rook-edgefs

func GetContainersRTDevices

func GetContainersRTDevices(nodeName string, maxContainerCapacity int64, nodeDisks []sys.LocalDisk, storeConfig *config.StoreConfig) (rtDevices []edgefsv1.RTDevices, err error)

func GetIdDevLinkName

func GetIdDevLinkName(dls string) (dl string)

EdgeFS RT-RD driver needs SCSI-3, ATA, NVMe by-id link

func GetRtkvsDevices

func GetRtkvsDevices(disks []string, directories []rookalpha.Directory, storeConfig *config.StoreConfig) edgefsv1.RtkvsDevices

func GetRtlfsDevices

func GetRtlfsDevices(directories []rookalpha.Directory, storeConfig *config.StoreConfig) []edgefsv1.RtlfsDevice

func UpdateStatefulsetAndWait

func UpdateStatefulsetAndWait(context *clusterd.Context, sts *appsv1.StatefulSet, namespace string) (*appsv1.StatefulSet, error)

UpdateStatefulsetAndWait updates a statefulset and waits until it is running to return. It will error if the statefulset does not exist to be updated or if it takes too long.

Types

type Cluster

type Cluster struct {
	Namespace string

	Version string
	Storage rookalpha.StorageScopeSpec

	NetworkSpec rookalpha.NetworkSpec
	Privileged  bool
	// contains filtered or unexported fields
}

Cluster keeps track of the Targets

func New

func New(
	context *clusterd.Context,
	namespace,
	version,
	serviceAccount string,
	storageSpec rookalpha.StorageScopeSpec,
	dataDirHostPath string,
	dataVolumeSize resource.Quantity,
	annotations rookalpha.Annotations,
	placement rookalpha.Placement,
	NetworkSpec rookalpha.NetworkSpec,
	resources v1.ResourceRequirements,
	resourceProfile string,
	chunkCacheSize resource.Quantity,
	ownerRef metav1.OwnerReference,
	deploymentConfig edgefsv1.ClusterDeploymentConfig,
	useHostLocalTime bool,
) *Cluster

New creates an instance of the Target manager

func (*Cluster) Start

func (c *Cluster) Start(rookImage string, nodes []rookalpha.Node, dro edgefsv1.DevicesResurrectOptions) (err error)

Start the target management

type ContainerDevices

type ContainerDevices struct {
	Ssds []sys.LocalDisk
	Hdds []sys.LocalDisk
}

func GetContainers

func GetContainers(maxContainerCapacity int64, devices []sys.LocalDisk, storeConfig *config.StoreConfig) ([]ContainerDevices, error)

Directories

Path Synopsis
Package config for Edgefs target config managed by the operator
Package config for Edgefs target config managed by the operator

Jump to

Keyboard shortcuts

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