v1alpha1

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Overview

TODO Rename this file by removing the version suffix information

TODO Rename this file by removing the version suffix information

TODO Rename this file by removing the version suffix information

TODO Rename this file by removing the version suffix information

TODO Rename this file by removing the version suffix information

TODO Rename this file by removing the version suffix information

TODO Rename this file by removing the version suffix information

Index

Constants

View Source
const (
	// DefaultCstorSparsePool is the environment variable that
	// flags if default cstor pool should be configured or not
	//
	// If value is "true", default cstor pool will be
	// installed/configured else for "false" it will
	// not be configured
	DefaultCstorSparsePool menv.ENVKey = "OPENEBS_IO_INSTALL_DEFAULT_CSTOR_SPARSE_POOL"

	// CreateDefaultStorageConfig is the environment
	// variable that flags if default storage pools and/or storage
	// classes should be created.
	//
	// Default is "true"
	CreateDefaultStorageConfig menv.ENVKey = "OPENEBS_IO_CREATE_DEFAULT_STORAGE_CONFIG"

	// InstallCRD is the environment
	// variable that flags if maya apiserver should install the CRDs
	// As the installation moves towards helm 3, the responsibility of installing
	// CRDs can be pushed to helm.
	//
	// Default is "true"
	InstallCRD menv.ENVKey = "OPENEBS_IO_INSTALL_CRD"
)

Variables

This section is empty.

Functions

func CstorPoolArtifacts

func CstorPoolArtifacts() (list artifactList)

CstorPoolArtifacts returns the cstor pool related artifacts corresponding to latest version

func CstorSnapshotArtifacts

func CstorSnapshotArtifacts() (list artifactList)

CstorSnapshotArtifacts returns the cstor snapshot related artifacts corresponding to latest version

func CstorSparsePoolArtifacts

func CstorSparsePoolArtifacts() (list artifactList)

CstorSparsePoolArtifacts returns sparse pool artifacts corresponding to latest version if cstor sparse pool creation is enabled

func CstorVolumeArtifacts

func CstorVolumeArtifacts() (list artifactList)

CstorVolumeArtifacts returns the cstor volume related artifacts corresponding to latest version

func EnvInstall

func EnvInstall() *envInstall

EnvInstall returns a new instance of envInstall

func EnvUpdateError

func EnvUpdateError(context string, err error) envMiddleware

EnvUpdateError updates the env instance with provided error

func EnvUpdateStatus

func EnvUpdateStatus(context, reason string, status EnvStatus) envMiddleware

EnvUpdateStatus updates the env instance with provided status info

func EnvUpdateSuccess

func EnvUpdateSuccess(context string) envMiddleware

EnvUpdateSuccess updates the env instance with success status

func IsCASTemplate

func IsCASTemplate(given *Artifact) bool

IsCASTemplate flags if the provided artifact is of type CASTemplate

NOTE:

This is an implementation of ArtifactPredicate

func IsCstorSparsePoolEnabled

func IsCstorSparsePoolEnabled() bool

IsCstorSparsePoolEnabled reads from env variable to check whether cstor sparse pool should be created by default or not. In addition, cstor sparse pool should be created only if the creation of default storage configuration is enabled.

func IsDefaultStorageConfigEnabled

func IsDefaultStorageConfigEnabled() (enabled bool)

IsDefaultStorageConfigEnabled reads from env variable to check whether default storage configuration should be created or not.

func IsInstallCRDEnabled

func IsInstallCRDEnabled() (enabled bool)

IsInstallCRDEnabled reads from env variable to check whether CRDs should be created by default or not.

func IsNotRunTask

func IsNotRunTask(given *Artifact) bool

IsNotRunTask flags if the provided artifact is not of type RunTask

NOTE:

This is an implementation of ArtifactPredicate

func JivaPoolArtifacts

func JivaPoolArtifacts() (list artifactList)

JivaPoolArtifacts returns the default jiva pool and storage class related artifacts corresponding to latest version

func JivaSnapshotArtifacts

func JivaSnapshotArtifacts() (list artifactList)

JivaSnapshotArtifacts returns the jiva snapshot related artifacts corresponding to latest version

func JivaVolumeArtifacts

func JivaVolumeArtifacts() (list artifactList)

JivaVolumeArtifacts returns the jiva volume related artifacts corresponding to latest version

func LocalPVArtifacts

func LocalPVArtifacts() (list artifactList)

LocalPVArtifacts returns the default Local PV storage class related artifacts corresponding to latest version

func OpenEBSCRDArtifacts

func OpenEBSCRDArtifacts() (list artifactList)

OpenEBSCRDArtifacts returns the CRDs required for latest version

func RegisteredArtifacts

func RegisteredArtifacts() (list artifactList)

RegisteredArtifacts returns the list of latest Artifacts that will get installed

func SnapshotPromoterSCArtifacts

func SnapshotPromoterSCArtifacts() (list artifactList)

SnapshotPromoterSCArtifacts returns the snapshot(clone) provisioner related artifacts

func StoragePoolArtifacts

func StoragePoolArtifacts() (list artifactList)

StoragePoolArtifacts returns the CRDs required for latest version

func VolumeStatsArtifacts

func VolumeStatsArtifacts() (list artifactList)

VolumeStatsArtifacts returns the CRDs required for latest version

Types

type Artifact

type Artifact struct {
	// Doc represents the YAML compatible artifact
	Doc string
}

Artifact represents a YAML compatible artifact that will be installed, applied, etc

func ParseArtifactListFromMultipleYamls

func ParseArtifactListFromMultipleYamls(m MultiYamlFetcher) (artifacts []*Artifact)

ParseArtifactListFromMultipleYamls generates a list of Artifacts from the yaml documents.

NOTE:

Each YAML document is assumed to be separated via "---"

func ParseArtifactListFromMultipleYamlsIf

func ParseArtifactListFromMultipleYamlsIf(
	m MultiYamlFetcher,
	p ArtifactListPredicate,
) (artifacts []*Artifact)

ParseArtifactListFromMultipleYamlsIf generates a list of Artifacts from yaml documents if predicate evaluation succeeds

func (*Artifact) Template

func (a *Artifact) Template(values map[string]interface{}, t template.Templater) (u *Artifact, err error)

type ArtifactIdentifier

type ArtifactIdentifier string

ArtifactIdentifier is a typed string to help identify the type of artifact

const (
	// CASTemplateArtifact helps in identifying a CAS Template based artifact
	CASTemplateArtifact ArtifactIdentifier = "kind: CASTemplate"
	// RunTaskArtifact helps in identifying a RunTask based artifact
	RunTaskArtifact ArtifactIdentifier = "kind: RunTask"
)

type ArtifactListPredicate

type ArtifactListPredicate func() bool

ArtifactListPredicate abstracts evaluating a condition against the provided artifact list

type ArtifactMiddleware

type ArtifactMiddleware func(given *Artifact) (updated *Artifact, err error)

ArtifactMiddleware abstracts updating a given artifact

func ArtifactTemplater

func ArtifactTemplater(values map[string]interface{}, t template.Templater) ArtifactMiddleware

ArtifactTemplater updates an artifact instance by templating it and returns the resulting templated instance

type ArtifactPredicate

type ArtifactPredicate func(given *Artifact) bool

ArtifactPredicate abstracts evaluating a condition against the provided artifact

type ConfigProvider

type ConfigProvider interface {
	Provide() (ic *InstallConfig, err error)
}

ConfigProvider abstracts providing an instance of install config

func ConfigMap

func ConfigMap(namespace, name string) ConfigProvider

ConfigMap returns a new instance of ConfigProvider

type ConfigUnmarshaller

type ConfigUnmarshaller func(conf string) (config *InstallConfig, err error)

ConfigUnmarshaller abstracts un-marshalling of config specifications into an instance of install config

type EnvLister

type EnvLister interface {
	List() (l *envList, err error)
}

EnvLister abstracts listing environment variables

type EnvStatus

type EnvStatus string

EnvStatus represents the status of operation against an env instance

const (
	EnvSetSuccess EnvStatus = "set env succeeded"
	EnvSetErr     EnvStatus = "set env failed"
	EnvSetSkip    EnvStatus = "set env skipped"
)

env set completion statuses

type InstallConfig

type InstallConfig struct {
	Spec InstallConfigSpec `json:"spec"`
}

InstallConfig is the config for installation workflow

func UnmarshallConfig

func UnmarshallConfig(conf string) (*InstallConfig, error)

UnmarshallConfig is an implementation of ConfigUnmarshaller

type InstallConfigSpec

type InstallConfigSpec struct {
	// Options provides a ordered list of install related options
	Options []Option `json:"options"`
}

type Installer

type Installer interface {
	Install() (errors []error)
	Clean() error
}

Installer abstracts installation

func SimpleInstaller

func SimpleInstaller() Installer

SimpleInstaller returns a new instance of simpleInstaller

type MultiYamlFetcher

type MultiYamlFetcher interface {
	FetchYamls() string
}

MultiYamlFetcher abstracts aggregating and returning multiple yaml documents as a string

type Option

type Option string

Option represent a install option that influences the installation workflow

type StoragePool

type StoragePool struct{}

func (StoragePool) FetchYamls

func (v StoragePool) FetchYamls() string

FetchYamls returns volume stats yamls

type VolumeStats

type VolumeStats struct{}

func (VolumeStats) FetchYamls

func (v VolumeStats) FetchYamls() string

FetchYamls returns volume stats yamls

Jump to

Keyboard shortcuts

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