framework

package
v0.13.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 58 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GET            = "get"
	LIST           = "list"
	PATCH          = "patch"
	CREATE         = "create"
	UPDATE         = "update"
	USE            = "use"
	POLICY         = "policy"
	Role           = "Role"
	ServiceAccount = "ServiceAccount"
)

Variables

View Source
var (
	JobPvcStorageSize = "2Gi"
	DBPvcStorageSize  = "1Gi"
)
View Source
var (
	DockerRegistry     = "kubedbci"
	SelfHostedOperator = true
	DBCatalogName      = "7.3.2"
)
View Source
var (
	CustomSecretSuffix = "custom-secret"
	CustomUsername     = "username1234567890"
	CustomPassword     = "password0987654321"
	AdminUser          = "admin"
	KeyAdminUserName   = "ADMIN_USERNAME"
	KeyAdminPassword   = "ADMIN_PASSWORD"
	ReadAllUser        = "readall"
	KeyReadAllUserName = "READALL_USERNAME"
	KeyReadAllPassword = "READALL_PASSWORD"
	ExporterSecretPath = "/var/run/secrets/kubedb.com/"
)
View Source
var (
	StashESBackupTask  = "elasticsearch-backup-7.2"
	StashESRestoreTask = "elasticsearch-restore-7.2"
)

Functions

This section is empty.

Types

type Framework

type Framework struct {
	Tunnel *portforward.Tunnel

	StorageClass string
	// contains filtered or unexported fields
}

func New

func New(
	restConfig *rest.Config,
	kubeClient kubernetes.Interface,
	apiExtKubeClient crd_cs.ApiextensionsV1beta1Interface,
	dbClient cs.Interface,
	kaClient ka.Interface,
	appCatalogClient appcat_cs.AppcatalogV1alpha1Interface,
	stashClient scs.Interface,
	storageClass string,
) *Framework

func (*Framework) CheckAppBindingSpec

func (f *Framework) CheckAppBindingSpec(meta metav1.ObjectMeta) error

func (*Framework) CheckSecret

func (f *Framework) CheckSecret(secret *core.Secret) error

func (*Framework) CleanAdmissionConfigs

func (f *Framework) CleanAdmissionConfigs()

func (*Framework) CleanDormantDatabase

func (f *Framework) CleanDormantDatabase()

func (*Framework) CleanElasticsearch

func (f *Framework) CleanElasticsearch()

func (*Framework) CleanSnapshot

func (f *Framework) CleanSnapshot()

func (*Framework) CreateBackupConfiguration

func (f *Framework) CreateBackupConfiguration(backupCfg *v1beta1.BackupConfiguration) error

func (*Framework) CreateBackupSession

func (f *Framework) CreateBackupSession(bc *v1beta1.BackupSession) error

func (*Framework) CreateElasticsearch

func (f *Framework) CreateElasticsearch(obj *api.Elasticsearch) error

func (*Framework) CreateNamespace

func (f *Framework) CreateNamespace() error

func (*Framework) CreateRepository

func (f *Framework) CreateRepository(repo *stashV1alpha1.Repository) error

func (*Framework) CreateRestoreSession

func (f *Framework) CreateRestoreSession(restoreSession *v1beta1.RestoreSession) error

func (*Framework) CreateRole

func (f *Framework) CreateRole(obj *rbac.Role) error

func (*Framework) CreateRoleBinding

func (f *Framework) CreateRoleBinding(obj *rbac.RoleBinding) error

func (*Framework) CreateSecret

func (f *Framework) CreateSecret(obj *core.Secret) error

TODO: Add more methods for Swift, Backblaze B2, Rest server backend.

func (*Framework) CreateServiceAccount

func (f *Framework) CreateServiceAccount(obj *core.ServiceAccount) error

func (*Framework) CreateSnapshot

func (f *Framework) CreateSnapshot(obj *api.Snapshot) error

func (*Framework) DeleteBackupConfiguration

func (f *Framework) DeleteBackupConfiguration(meta metav1.ObjectMeta) error

func (*Framework) DeleteBackupSession

func (f *Framework) DeleteBackupSession(meta metav1.ObjectMeta) error

func (*Framework) DeleteDormantDatabase

func (f *Framework) DeleteDormantDatabase(meta metav1.ObjectMeta) error

func (*Framework) DeleteElasticsearch

func (f *Framework) DeleteElasticsearch(meta metav1.ObjectMeta) error

func (*Framework) DeleteNamespace

func (f *Framework) DeleteNamespace() error

func (*Framework) DeleteRepository

func (f *Framework) DeleteRepository(meta metav1.ObjectMeta) error

func (Framework) DeleteRestoreSession

func (f Framework) DeleteRestoreSession(meta metav1.ObjectMeta) error

func (*Framework) DeleteSecret

func (f *Framework) DeleteSecret(meta metav1.ObjectMeta) error

func (*Framework) DeleteSnapshot

func (f *Framework) DeleteSnapshot(meta metav1.ObjectMeta) error

func (*Framework) EventuallyAPIServiceReady

func (f *Framework) EventuallyAPIServiceReady() GomegaAsyncAssertion

func (*Framework) EventuallyAppBinding

func (f *Framework) EventuallyAppBinding(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyBackupSessionPhase

func (f *Framework) EventuallyBackupSessionPhase(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyCRD

func (f *Framework) EventuallyCRD() GomegaAsyncAssertion

func (*Framework) EventuallyDBSecretCount

func (f *Framework) EventuallyDBSecretCount(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyDormantDatabase

func (f *Framework) EventuallyDormantDatabase(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyDormantDatabaseStatus

func (f *Framework) EventuallyDormantDatabaseStatus(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyElasticsearch

func (f *Framework) EventuallyElasticsearch(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyElasticsearchClientReady

func (f *Framework) EventuallyElasticsearchClientReady(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyElasticsearchIndicesCount

func (f *Framework) EventuallyElasticsearchIndicesCount(client es.ESClient) GomegaAsyncAssertion

func (*Framework) EventuallyElasticsearchPhase

func (f *Framework) EventuallyElasticsearchPhase(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyElasticsearchRunning

func (f *Framework) EventuallyElasticsearchRunning(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyJobPVCSize

func (f *Framework) EventuallyJobPVCSize(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyJobVolumeEmptyDirSize

func (f *Framework) EventuallyJobVolumeEmptyDirSize(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyPVCCount

func (f *Framework) EventuallyPVCCount(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyRestoreSessionPhase

func (f *Framework) EventuallyRestoreSessionPhase(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallySnapshot

func (f *Framework) EventuallySnapshot(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallySnapshotCount

func (f *Framework) EventuallySnapshotCount(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallySnapshotDataFound

func (f *Framework) EventuallySnapshotDataFound(snapshot *api.Snapshot) GomegaAsyncAssertion

func (*Framework) EventuallySnapshotPhase

func (f *Framework) EventuallySnapshotPhase(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyWipedOut

func (f *Framework) EventuallyWipedOut(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EvictPodsFromStatefulSet

func (f *Framework) EvictPodsFromStatefulSet(meta metav1.ObjectMeta) error

func (*Framework) FoundStashCRDs

func (f *Framework) FoundStashCRDs() bool

func (*Framework) GetClientPodName

func (f *Framework) GetClientPodName(elasticsearch *api.Elasticsearch) string

func (*Framework) GetDormantDatabase

func (f *Framework) GetDormantDatabase(meta metav1.ObjectMeta) (*api.DormantDatabase, error)

func (*Framework) GetElasticClient

func (f *Framework) GetElasticClient(meta metav1.ObjectMeta) (es.ESClient, error)

func (*Framework) GetElasticsearch

func (f *Framework) GetElasticsearch(meta metav1.ObjectMeta) (*api.Elasticsearch, error)

func (*Framework) GetSnapshot

func (f *Framework) GetSnapshot(meta metav1.ObjectMeta) (*api.Snapshot, error)

func (*Framework) IndicesCount

func (f *Framework) IndicesCount(obj *api.Elasticsearch, indicesCount int) int

func (*Framework) Invoke

func (f *Framework) Invoke() *Invocation

func (*Framework) Namespace

func (f *Framework) Namespace() string

func (*Framework) PatchDormantDatabase

func (f *Framework) PatchDormantDatabase(meta metav1.ObjectMeta, transform func(*api.DormantDatabase) *api.DormantDatabase) (*api.DormantDatabase, error)

func (*Framework) RunOperatorAndServer

func (f *Framework) RunOperatorAndServer(config *restclient.Config, kubeconfigPath string, stopCh <-chan struct{})

func (*Framework) TryPatchElasticsearch

func (f *Framework) TryPatchElasticsearch(meta metav1.ObjectMeta, transform func(*api.Elasticsearch) *api.Elasticsearch) (*api.Elasticsearch, error)

func (*Framework) UpdateSecret

func (f *Framework) UpdateSecret(meta metav1.ObjectMeta, transformer func(core.Secret) core.Secret) error

type Invocation

type Invocation struct {
	*Framework
	// contains filtered or unexported fields
}

func (*Invocation) BackupConfiguration

func (i *Invocation) BackupConfiguration(meta metav1.ObjectMeta) *v1beta1.BackupConfiguration

func (*Invocation) BackupSession

func (i *Invocation) BackupSession(meta metav1.ObjectMeta) *v1beta1.BackupSession

func (*Invocation) CombinedElasticsearch

func (i *Invocation) CombinedElasticsearch() *api.Elasticsearch

func (*Invocation) CreateConfigMap

func (f *Invocation) CreateConfigMap(obj *core.ConfigMap) error

func (*Invocation) CreatePersistentVolumeClaim

func (f *Invocation) CreatePersistentVolumeClaim(pvc *core.PersistentVolumeClaim) error

func (*Invocation) DedicatedElasticsearch

func (i *Invocation) DedicatedElasticsearch() *api.Elasticsearch

func (*Invocation) DeleteConfigMap

func (f *Invocation) DeleteConfigMap(meta metav1.ObjectMeta) error

func (*Invocation) DeletePersistentVolumeClaim

func (f *Invocation) DeletePersistentVolumeClaim(meta metav1.ObjectMeta) error

func (*Invocation) ExtClient

func (fi *Invocation) ExtClient() cs.Interface

func (*Invocation) GetClientConfig

func (f *Invocation) GetClientConfig(elasticsearch *v1alpha12.Elasticsearch) string

func (*Invocation) GetCommonConfig

func (f *Invocation) GetCommonConfig(elasticsearch *v1alpha12.Elasticsearch) string

func (*Invocation) GetCustomConfig

func (f *Invocation) GetCustomConfig() *core.ConfigMap

func (*Invocation) GetDataConfig

func (f *Invocation) GetDataConfig(elasticsearch *v1alpha12.Elasticsearch) string

func (*Invocation) GetMasterConfig

func (f *Invocation) GetMasterConfig(elasticsearch *v1alpha12.Elasticsearch) string

func (*Invocation) GetPersistentVolumeClaim

func (f *Invocation) GetPersistentVolumeClaim() *core.PersistentVolumeClaim

func (*Invocation) IsUsingProvidedConfig

func (f *Invocation) IsUsingProvidedConfig(elasticsearch *v1alpha12.Elasticsearch, nodeInfo []es.NodeInfo) bool

func (*Invocation) KubeClient

func (fi *Invocation) KubeClient() kubernetes.Interface

func (*Invocation) PatchSecretForRestic

func (i *Invocation) PatchSecretForRestic(secret *core.Secret) *core.Secret

func (*Invocation) Repository

func (i *Invocation) Repository(meta metav1.ObjectMeta, secretName string) *stashV1alpha1.Repository

func (*Invocation) RestConfig

func (fi *Invocation) RestConfig() *rest.Config

func (*Invocation) RestoreSession

func (i *Invocation) RestoreSession(meta, oldMeta metav1.ObjectMeta) *v1beta1.RestoreSession

func (*Invocation) RoleBinding

func (i *Invocation) RoleBinding(saName string, roleName string) *rbac.RoleBinding

func (*Invocation) RoleForElasticsearch

func (i *Invocation) RoleForElasticsearch(meta metav1.ObjectMeta) *rbac.Role

func (*Invocation) RoleForSnapshot

func (i *Invocation) RoleForSnapshot(meta metav1.ObjectMeta) *rbac.Role

func (*Invocation) SecretForAzureBackend

func (i *Invocation) SecretForAzureBackend() *core.Secret

func (*Invocation) SecretForDatabaseAuthentication

func (i *Invocation) SecretForDatabaseAuthentication(meta metav1.ObjectMeta, mangedByKubeDB bool) *core.Secret

func (*Invocation) SecretForGCSBackend

func (i *Invocation) SecretForGCSBackend() *core.Secret

func (*Invocation) SecretForLocalBackend

func (i *Invocation) SecretForLocalBackend() *core.Secret

func (*Invocation) SecretForS3Backend

func (i *Invocation) SecretForS3Backend() *core.Secret

func (*Invocation) SecretForSwiftBackend

func (i *Invocation) SecretForSwiftBackend() *core.Secret

func (*Invocation) ServiceAccount

func (i *Invocation) ServiceAccount() *core.ServiceAccount

func (*Invocation) Snapshot

func (i *Invocation) Snapshot() *api.Snapshot

Jump to

Keyboard shortcuts

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