Documentation ¶
Index ¶
- Constants
- func GenRandString(ln int) string
- func GetStringFromMap(input map[string]string) string
- type BackupState
- type BackupStorageS3Spec
- type BackupStorageSpec
- type BackupStorageType
- type BundleObject
- type ClusterState
- type Cmd
- func (p Cmd) Annotate(resource, clusterName, annotName, instance string) error
- func (p Cmd) CreateCluster(typ, operatorVersion, clusterName, cr string, bundle []BundleObject) error
- func (p Cmd) CreateSecret(name string, data map[string][]byte) error
- func (p Cmd) DeleteCluster(typ, operatorName, appName string, delPVC bool) error
- func (p Cmd) GetObject(typ, name string) ([]byte, error)
- func (p Cmd) GetObjects(typ string) ([]byte, error)
- func (p Cmd) GetPlatformType() PlatformType
- func (p Cmd) GetSecrets(appName string) (map[string][]byte, error)
- func (p Cmd) GetServiceBrokerInstances(typ string) ([]byte, error)
- func (p Cmd) Instances(typ string) ([]string, error)
- func (p Cmd) IsObjExists(typ, name string) (bool, error)
- func (p Cmd) S3Storage(appName string, c S3StorageConfig) (*BackupStorageSpec, error)
- func (p Cmd) Upgrade(typ string, clusterName, cr string) error
- type Deploy
- type ErrAlreadyExists
- type ErrCmdRun
- type ErrNoS3Options
- type Msg
- type Objects
- type PlatformType
- type S3StorageConfig
- type VolumeSpec
Constants ¶
View Source
const ( BackupUnknown BackupState = "Unknown" BackupStarting = "Starting" BackupRunning = "Running" BackupFailed = "Failed" BackupSucceeded = "Succeeded" )
View Source
const ( ClusterStateUnknown ClusterState = "unknown" ClusterStateInit = "initializing" ClusterStateReady = "ready" ClusterStateError = "error" )
View Source
const (
DefaultBcpStorageName = "defaultS3Storage"
)
Variables ¶
This section is empty.
Functions ¶
func GenRandString ¶
GenRandString generates a k8s-name legitimate string of given length
func GetStringFromMap ¶
Types ¶
type BackupState ¶
type BackupState string
type BackupStorageS3Spec ¶
type BackupStorageSpec ¶
type BackupStorageSpec struct { Type BackupStorageType `json:"type"` S3 BackupStorageS3Spec `json:"s3,omitempty"` Volume *VolumeSpec `json:"volume,omitempty"` }
type BackupStorageType ¶
type BackupStorageType string
const ( BackupStorageFilesystem BackupStorageType = "filesystem" BackupStorageS3 BackupStorageType = "s3" )
type BundleObject ¶
type ClusterState ¶
type ClusterState string
type Cmd ¶
type Cmd struct { Namespace string // contains filtered or unexported fields }
func (Cmd) CreateCluster ¶
func (p Cmd) CreateCluster(typ, operatorVersion, clusterName, cr string, bundle []BundleObject) error
func (Cmd) CreateSecret ¶
CreateSecret creates k8s secret object with the given name and data
func (Cmd) DeleteCluster ¶
func (Cmd) GetPlatformType ¶
func (p Cmd) GetPlatformType() PlatformType
GetPlatformType is for determine and return platform type
func (Cmd) GetServiceBrokerInstances ¶
func (Cmd) S3Storage ¶
func (p Cmd) S3Storage(appName string, c S3StorageConfig) (*BackupStorageSpec, error)
type Deploy ¶
type Deploy interface { OperatorType() string // contains filtered or unexported methods }
type ErrAlreadyExists ¶
func (ErrAlreadyExists) Error ¶
func (e ErrAlreadyExists) Error() string
type ErrNoS3Options ¶
type ErrNoS3Options string
func (ErrNoS3Options) Error ¶
func (e ErrNoS3Options) Error() string
type Objects ¶
type Objects struct {
Bundle []BundleObject
}
type PlatformType ¶
type PlatformType string
const ( PlatformKubernetes PlatformType = "kubernetes" PlatformMinikube PlatformType = "minikube" PlatformOpenshift PlatformType = "openshift" PlatformMinishift PlatformType = "minishift" )
type S3StorageConfig ¶
type VolumeSpec ¶
type VolumeSpec struct { // EmptyDir to use as data volume for mysql. EmptyDir represents a temporary // directory that shares a pod's lifetime. // +optional EmptyDir *corev1.EmptyDirVolumeSource `json:"emptyDir,omitempty"` // HostPath to use as data volume for mysql. HostPath represents a // pre-existing file or directory on the host machine that is directly // exposed to the container. // +optional HostPath *corev1.HostPathVolumeSource `json:"hostPath,omitempty"` // PersistentVolumeClaim to specify PVC spec for the volume for mysql data. // It has the highest level of precedence, followed by HostPath and // EmptyDir. And represents the PVC specification. // +optional PersistentVolumeClaim *corev1.PersistentVolumeClaimSpec `json:"persistentVolumeClaim,omitempty"` }
Click to show internal directories.
Click to hide internal directories.