framework

package
v0.7.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Overview

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

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

	KeyMySQLUser     = "username"
	KeyMySQLPassword = "password"
)

Variables

View Source
var (
	DockerRegistry = "kubedbci"
	DBCatalogName  = "8.0.14"
)
View Source
var (
	JobPvcStorageSize = "100Mi"
	DBPvcStorageSize  = "50Mi"
)

Functions

This section is empty.

Types

type Framework

type Framework struct {
	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) CleanMySQL

func (f *Framework) CleanMySQL()

func (*Framework) CleanWorkloadLeftOvers

func (f *Framework) CleanWorkloadLeftOvers()

func (*Framework) CreateBackupConfiguration

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

func (*Framework) CreateMySQL

func (f *Framework) CreateMySQL(obj *api.MySQL) 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 *stashv1beta1.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) DeleteBackupConfiguration

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

func (*Framework) DeleteConfigMap

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

func (*Framework) DeleteMySQL

func (f *Framework) DeleteMySQL(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) EventuallyAppBinding

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

func (*Framework) EventuallyCRD

func (f *Framework) EventuallyCRD() GomegaAsyncAssertion

func (*Framework) EventuallyCountRow

func (f *Framework) EventuallyCountRow(meta metav1.ObjectMeta, dbName string, clientPodIndex int) GomegaAsyncAssertion

func (*Framework) EventuallyCreateDatabase

func (f *Framework) EventuallyCreateDatabase(meta metav1.ObjectMeta, dbName string) GomegaAsyncAssertion

func (*Framework) EventuallyCreateTable

func (f *Framework) EventuallyCreateTable(meta metav1.ObjectMeta, dbName string) GomegaAsyncAssertion

func (*Framework) EventuallyDBSecretCount

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

func (*Framework) EventuallyDatabaseReady

func (f *Framework) EventuallyDatabaseReady(meta metav1.ObjectMeta, dbName string) GomegaAsyncAssertion

func (*Framework) EventuallyGetPrimaryHostIndex

func (f *Framework) EventuallyGetPrimaryHostIndex(meta metav1.ObjectMeta, dbName string, clientPodIndex int) GomegaAsyncAssertion

func (*Framework) EventuallyInsertRow

func (f *Framework) EventuallyInsertRow(meta metav1.ObjectMeta, dbName string, clientPodIndex, total int) GomegaAsyncAssertion

func (*Framework) EventuallyMySQL

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

func (*Framework) EventuallyMySQLPhase

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

func (*Framework) EventuallyMySQLRunning

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

func (*Framework) EventuallyMySQLVariable

func (f *Framework) EventuallyMySQLVariable(meta metav1.ObjectMeta, dbName string, config string) GomegaAsyncAssertion

func (*Framework) EventuallyONLINEMembersCount

func (f *Framework) EventuallyONLINEMembersCount(meta metav1.ObjectMeta, dbName string, clientPodIndex int) 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) EventuallySnapshotInRepository

func (f *Framework) EventuallySnapshotInRepository(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) GetMySQL

func (f *Framework) GetMySQL(meta metav1.ObjectMeta) (*api.MySQL, error)

func (*Framework) GetMySQLRootPassword

func (f *Framework) GetMySQLRootPassword(mysql *api.MySQL) (string, error)

func (*Framework) GetPrimaryHostIndex

func (f *Framework) GetPrimaryHostIndex(meta metav1.ObjectMeta, dbName string, clientPodIndex int) int

func (*Framework) GetSecret

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

func (*Framework) InitScriptConfigMap

func (f *Framework) InitScriptConfigMap() (*core.ConfigMap, error)

func (*Framework) InsertRowFromSecondary

func (f *Framework) InsertRowFromSecondary(meta metav1.ObjectMeta, dbName string, clientPodIndex int) GomegaAsyncAssertion

func (*Framework) Invoke

func (f *Framework) Invoke() *Invocation

func (*Framework) Namespace

func (f *Framework) Namespace() string

func (*Framework) PatchMySQL

func (f *Framework) PatchMySQL(meta metav1.ObjectMeta, transform func(*api.MySQL) *api.MySQL) (*api.MySQL, error)

func (*Framework) PauseBackupConfiguration

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

func (*Framework) PrintDebugHelpers

func (f *Framework) PrintDebugHelpers(mysqlName string, replicas int)

func (*Framework) RemoverPrimaryToFailover

func (f *Framework) RemoverPrimaryToFailover(meta metav1.ObjectMeta, primaryPodIndex int) error

func (*Framework) UpdateSecret

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

func (*Framework) WaitUntilPodRunningBySelector

func (f *Framework) WaitUntilPodRunningBySelector(mysql *api.MySQL) error

type Invocation

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

func (*Invocation) App

func (fi *Invocation) App() string

func (*Invocation) BackupConfiguration

func (*Invocation) CreateConfigMap

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

func (*Invocation) CreatePersistentVolumeClaim

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

func (*Invocation) DeletePersistentVolumeClaim

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

func (*Invocation) ExtClient

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

func (*Invocation) GetCustomConfig

func (f *Invocation) GetCustomConfig(configs []string) *core.ConfigMap

func (*Invocation) GetPersistentVolumeClaim

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

func (*Invocation) MySQL

func (f *Invocation) MySQL() *api.MySQL

func (*Invocation) MySQLGroup

func (f *Invocation) MySQLGroup() *api.MySQL

func (*Invocation) PatchSecretForRestic

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

func (*Invocation) Repository

func (f *Invocation) Repository(meta metav1.ObjectMeta) *stashV1alpha1.Repository

func (*Invocation) RestoreSession

func (*Invocation) RoleBinding

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

func (*Invocation) RoleForMySQL

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

func (*Invocation) RoleForSnapshot

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

func (*Invocation) SecretForAzureBackend

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

func (*Invocation) SecretForDatabaseAuthentication

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

func (*Invocation) SecretForGCSBackend

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

func (*Invocation) SecretForLocalBackend

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

func (*Invocation) SecretForS3Backend

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

func (*Invocation) SecretForSwiftBackend

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

func (*Invocation) ServiceAccount

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

type KubedbTable

type KubedbTable struct {
	Id   int64
	Name string
}

Jump to

Keyboard shortcuts

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