Documentation ¶
Index ¶
- Constants
- Variables
- func IsRepSet(db *api.MongoDB) bool
- type Framework
- func (f *Framework) CheckAppBindingSpec(meta metav1.ObjectMeta) error
- func (f *Framework) CheckSecret(secret *core.Secret) error
- func (f *Framework) CleanAdmissionConfigs()
- func (f *Framework) CleanDormantDatabase()
- func (f *Framework) CleanMongoDB()
- func (f *Framework) CleanSnapshot()
- func (f *Framework) CleanWorkloadLeftOvers()
- func (f *Framework) ConnectAndPing(meta metav1.ObjectMeta, clientPodName string, isReplSet bool) (*mongo.Client, *portforward.Tunnel, error)
- func (f *Framework) CreateBackupConfiguration(backupCfg *v1beta1.BackupConfiguration) error
- func (f *Framework) CreateBackupSession(bc *v1beta1.BackupSession) error
- func (f *Framework) CreateNamespace() error
- func (f *Framework) CreateRepository(repo *stashV1alpha1.Repository) error
- func (f *Framework) CreateRestoreSession(restoreSession *v1beta1.RestoreSession) error
- func (f *Framework) CreateRole(obj *rbac.Role) error
- func (f *Framework) CreateRoleBinding(obj *rbac.RoleBinding) error
- func (f *Framework) CreateSecret(obj *core.Secret) error
- func (f *Framework) CreateServiceAccount(obj *core.ServiceAccount) error
- func (f *Framework) CreateSnapshot(obj *api.Snapshot) error
- func (f *Framework) CreateStashMgRoleBinding(meta metav1.ObjectMeta) error
- func (f *Framework) CreateStashMgServiceAccount(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteBackupConfiguration(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteBackupSession(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteConfigMap(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteDormantDatabase(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteMongoDB(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteNamespace() error
- func (f *Framework) DeleteRepository(meta metav1.ObjectMeta) error
- func (f Framework) DeleteRestoreSession(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteSecret(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteSnapshot(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteStashMgRBAC(meta metav1.ObjectMeta) error
- func (f *Framework) EnsureStashMgRBAC(meta metav1.ObjectMeta) error
- func (f *Framework) EventuallyAPIServiceReady() GomegaAsyncAssertion
- func (f *Framework) EventuallyAppBinding(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyBackupSessionPhase(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyCRD() GomegaAsyncAssertion
- func (f *Framework) EventuallyCollectionPartitioned(meta metav1.ObjectMeta, dbName string) GomegaAsyncAssertion
- func (f *Framework) EventuallyDBSecretCount(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyDocumentExists(meta metav1.ObjectMeta, dbName string, isReplSet bool, collectionCount int) GomegaAsyncAssertion
- func (f *Framework) EventuallyDormantDatabase(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyDormantDatabaseStatus(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyEnableSharding(meta metav1.ObjectMeta, dbName string) GomegaAsyncAssertion
- func (f *Framework) EventuallyInsertDocument(meta metav1.ObjectMeta, dbName string, isRepset bool, collectionCount int) GomegaAsyncAssertion
- func (f *Framework) EventuallyJobPVCSize(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyJobVolumeEmptyDirSize(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyMaxIncomingConnections(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyMongoDB(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyMongoDBPhase(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyMongoDBRunning(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyMultipleSnapshotFinishedProcessing(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyPVCCount(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyRestoreSessionPhase(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallySnapshot(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallySnapshotCount(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallySnapshotDataFound(snapshot *api.Snapshot) GomegaAsyncAssertion
- func (f *Framework) EventuallySnapshotPhase(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyWipedOut(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EvictPodsFromDeployment(meta metav1.ObjectMeta) error
- func (f *Framework) EvictPodsFromStatefulSet(meta metav1.ObjectMeta) error
- func (f *Framework) ForwardPort(meta metav1.ObjectMeta, clientPodName string) (*portforward.Tunnel, error)
- func (f *Framework) FoundStashCRDs() bool
- func (f *Framework) GetDormantDatabase(meta metav1.ObjectMeta) (*api.DormantDatabase, error)
- func (f *Framework) GetMongoDB(meta metav1.ObjectMeta) (*api.MongoDB, error)
- func (f *Framework) GetMongoDBClient(meta metav1.ObjectMeta, tunnel *portforward.Tunnel, isReplSet bool) (*options.ClientOptions, error)
- func (f *Framework) GetMongoDBRootPassword(mongodb *api.MongoDB) (string, error)
- func (f *Framework) GetMongosPodName(meta metav1.ObjectMeta) (string, error)
- func (f *Framework) GetPrimaryInstance(meta metav1.ObjectMeta, isReplSet bool) (string, error)
- func (f *Framework) GetReplicaMasterNode(meta metav1.ObjectMeta, nodeName string, replicaNumber *int32) (string, error)
- func (f *Framework) GetSnapshot(meta metav1.ObjectMeta) (*api.Snapshot, error)
- func (f *Framework) Invoke() *Invocation
- func (f *Framework) Namespace() string
- func (f *Framework) PatchDormantDatabase(meta metav1.ObjectMeta, ...) (*api.DormantDatabase, error)
- func (f *Framework) PatchMongoDB(meta metav1.ObjectMeta, transform func(*api.MongoDB) *api.MongoDB) (*api.MongoDB, error)
- func (f *Framework) RunOperatorAndServer(config *restclient.Config, kubeconfigPath string, stopCh <-chan struct{})
- func (f *Framework) UpdateSecret(meta metav1.ObjectMeta, transformer func(core.Secret) core.Secret) error
- type Invocation
- func (i *Invocation) BackupConfiguration(meta metav1.ObjectMeta) *v1beta1.BackupConfiguration
- func (i *Invocation) BackupSession(meta metav1.ObjectMeta) *v1beta1.BackupSession
- func (i *Invocation) CreateConfigMap(obj *core.ConfigMap) error
- func (i *Invocation) CreateMongoDB(obj *api.MongoDB) error
- func (i *Invocation) CreatePersistentVolumeClaim(pvc *core.PersistentVolumeClaim) error
- func (i *Invocation) DBClient() cs.Interface
- func (i *Invocation) DeletePersistentVolumeClaim(meta metav1.ObjectMeta) error
- func (i *Invocation) GetCustomConfig(configs []string) *core.ConfigMap
- func (i *Invocation) GetPersistentVolumeClaim() *core.PersistentVolumeClaim
- func (i *Invocation) MongoDBRS() *api.MongoDB
- func (i *Invocation) MongoDBShard() *api.MongoDB
- func (i *Invocation) MongoDBStandalone() *api.MongoDB
- func (i *Invocation) PatchSecretForRestic(secret *core.Secret) *core.Secret
- func (i *Invocation) Repository(meta metav1.ObjectMeta, secretName string) *stashV1alpha1.Repository
- func (i *Invocation) RestoreSession(meta, oldMeta metav1.ObjectMeta) *v1beta1.RestoreSession
- func (i *Invocation) RoleBinding(saName string, roleName string) *rbac.RoleBinding
- func (i *Invocation) RoleForMongoDB(meta metav1.ObjectMeta) *rbac.Role
- func (i *Invocation) RoleForSnapshot(meta metav1.ObjectMeta) *rbac.Role
- func (i *Invocation) SecretForAzureBackend() *core.Secret
- func (i *Invocation) SecretForDatabaseAuthentication(meta metav1.ObjectMeta, mangedByKubeDB bool) *core.Secret
- func (i *Invocation) SecretForGCSBackend() *core.Secret
- func (i *Invocation) SecretForLocalBackend() *core.Secret
- func (i *Invocation) SecretForS3Backend() *core.Secret
- func (i *Invocation) SecretForSwiftBackend() *core.Secret
- func (i *Invocation) ServiceAccount() *core.ServiceAccount
- func (i *Invocation) Snapshot() *api.Snapshot
- type KubedbTable
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" KeyMongoDBUser = "username" KeyMongoDBPassword = "password" )
Variables ¶
View Source
var ( DockerRegistry = "kubedbci" SelfHostedOperator = false DBCatalogName = "4.1.7-v1" )
View Source
var ( JobPvcStorageSize = "2Gi" DBPvcStorageSize = "1Gi" )
View Source
var ( StashMgBackupTask = "mongo-backup-task" StashMgRestoreTask = "mongo-restore-task" StashMgClusterRole = "mongo-backup-restore" StashMgSA = "mongo-backup-restore" StashMgRoleBinding = "mongo-backup-restore" )
Functions ¶
Types ¶
type Framework ¶
type Framework struct { StorageClass string // contains filtered or unexported fields }
func (*Framework) CheckAppBindingSpec ¶
func (f *Framework) CheckAppBindingSpec(meta metav1.ObjectMeta) error
func (*Framework) CleanAdmissionConfigs ¶
func (f *Framework) CleanAdmissionConfigs()
func (*Framework) CleanDormantDatabase ¶
func (f *Framework) CleanDormantDatabase()
func (*Framework) CleanMongoDB ¶
func (f *Framework) CleanMongoDB()
func (*Framework) CleanSnapshot ¶
func (f *Framework) CleanSnapshot()
func (*Framework) CleanWorkloadLeftOvers ¶
func (f *Framework) CleanWorkloadLeftOvers()
func (*Framework) ConnectAndPing ¶
func (f *Framework) ConnectAndPing(meta metav1.ObjectMeta, clientPodName string, isReplSet bool) (*mongo.Client, *portforward.Tunnel, error)
func (*Framework) CreateBackupConfiguration ¶
func (f *Framework) CreateBackupConfiguration(backupCfg *v1beta1.BackupConfiguration) error
func (*Framework) CreateBackupSession ¶
func (f *Framework) CreateBackupSession(bc *v1beta1.BackupSession) error
func (*Framework) CreateNamespace ¶
func (*Framework) CreateRepository ¶
func (f *Framework) CreateRepository(repo *stashV1alpha1.Repository) error
func (*Framework) CreateRestoreSession ¶
func (f *Framework) CreateRestoreSession(restoreSession *v1beta1.RestoreSession) error
func (*Framework) CreateRoleBinding ¶
func (f *Framework) CreateRoleBinding(obj *rbac.RoleBinding) error
func (*Framework) CreateServiceAccount ¶
func (f *Framework) CreateServiceAccount(obj *core.ServiceAccount) error
func (*Framework) CreateStashMgRoleBinding ¶
func (f *Framework) CreateStashMgRoleBinding(meta metav1.ObjectMeta) error
func (*Framework) CreateStashMgServiceAccount ¶
func (f *Framework) CreateStashMgServiceAccount(meta metav1.ObjectMeta) 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) DeleteConfigMap ¶
func (f *Framework) DeleteConfigMap(meta metav1.ObjectMeta) error
func (*Framework) DeleteDormantDatabase ¶
func (f *Framework) DeleteDormantDatabase(meta metav1.ObjectMeta) error
func (*Framework) DeleteMongoDB ¶
func (f *Framework) DeleteMongoDB(meta metav1.ObjectMeta) error
func (*Framework) DeleteNamespace ¶
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) DeleteStashMgRBAC ¶
func (f *Framework) DeleteStashMgRBAC(meta metav1.ObjectMeta) error
func (*Framework) EnsureStashMgRBAC ¶
func (f *Framework) EnsureStashMgRBAC(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) EventuallyCollectionPartitioned ¶
func (f *Framework) EventuallyCollectionPartitioned(meta metav1.ObjectMeta, dbName string) GomegaAsyncAssertion
EventuallyCollectionPartitioned checks if a database is partitioned or not. Call this only when spec.shardTopology is set.
func (*Framework) EventuallyDBSecretCount ¶
func (f *Framework) EventuallyDBSecretCount(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallyDocumentExists ¶
func (*Framework) EventuallyDormantDatabase ¶
func (f *Framework) EventuallyDormantDatabase(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallyDormantDatabaseStatus ¶
func (f *Framework) EventuallyDormantDatabaseStatus(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallyEnableSharding ¶
func (f *Framework) EventuallyEnableSharding(meta metav1.ObjectMeta, dbName string) GomegaAsyncAssertion
EventuallyEnableSharding enables sharding of a database. Call this only when spec.shardTopology is set.
func (*Framework) EventuallyInsertDocument ¶
func (*Framework) EventuallyJobPVCSize ¶
func (f *Framework) EventuallyJobPVCSize(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallyJobVolumeEmptyDirSize ¶
func (f *Framework) EventuallyJobVolumeEmptyDirSize(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallyMaxIncomingConnections ¶
func (f *Framework) EventuallyMaxIncomingConnections(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallyMongoDB ¶
func (f *Framework) EventuallyMongoDB(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallyMongoDBPhase ¶
func (f *Framework) EventuallyMongoDBPhase(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallyMongoDBRunning ¶
func (f *Framework) EventuallyMongoDBRunning(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallyMultipleSnapshotFinishedProcessing ¶
func (f *Framework) EventuallyMultipleSnapshotFinishedProcessing(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 (*Framework) EventuallySnapshotPhase ¶
func (f *Framework) EventuallySnapshotPhase(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallyWipedOut ¶
func (f *Framework) EventuallyWipedOut(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EvictPodsFromDeployment ¶
func (f *Framework) EvictPodsFromDeployment(meta metav1.ObjectMeta) error
func (*Framework) EvictPodsFromStatefulSet ¶
func (f *Framework) EvictPodsFromStatefulSet(meta metav1.ObjectMeta) error
func (*Framework) ForwardPort ¶
func (f *Framework) ForwardPort(meta metav1.ObjectMeta, clientPodName string) (*portforward.Tunnel, error)
func (*Framework) FoundStashCRDs ¶
func (*Framework) GetDormantDatabase ¶
func (f *Framework) GetDormantDatabase(meta metav1.ObjectMeta) (*api.DormantDatabase, error)
func (*Framework) GetMongoDB ¶
func (*Framework) GetMongoDBClient ¶
func (f *Framework) GetMongoDBClient(meta metav1.ObjectMeta, tunnel *portforward.Tunnel, isReplSet bool) (*options.ClientOptions, error)
func (*Framework) GetMongoDBRootPassword ¶
func (*Framework) GetMongosPodName ¶
func (f *Framework) GetMongosPodName(meta metav1.ObjectMeta) (string, error)
func (*Framework) GetPrimaryInstance ¶
func (*Framework) GetReplicaMasterNode ¶
func (*Framework) GetSnapshot ¶
func (*Framework) Invoke ¶
func (f *Framework) Invoke() *Invocation
func (*Framework) PatchDormantDatabase ¶
func (f *Framework) PatchDormantDatabase(meta metav1.ObjectMeta, transform func(*api.DormantDatabase) *api.DormantDatabase) (*api.DormantDatabase, error)
func (*Framework) PatchMongoDB ¶
func (*Framework) RunOperatorAndServer ¶
func (f *Framework) RunOperatorAndServer(config *restclient.Config, kubeconfigPath string, stopCh <-chan struct{})
func (*Framework) UpdateSecret ¶
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) CreateConfigMap ¶
func (i *Invocation) CreateConfigMap(obj *core.ConfigMap) error
func (*Invocation) CreateMongoDB ¶
func (i *Invocation) CreateMongoDB(obj *api.MongoDB) error
func (*Invocation) CreatePersistentVolumeClaim ¶
func (i *Invocation) CreatePersistentVolumeClaim(pvc *core.PersistentVolumeClaim) error
func (*Invocation) DBClient ¶
func (i *Invocation) DBClient() cs.Interface
func (*Invocation) DeletePersistentVolumeClaim ¶
func (i *Invocation) DeletePersistentVolumeClaim(meta metav1.ObjectMeta) error
func (*Invocation) GetCustomConfig ¶
func (i *Invocation) GetCustomConfig(configs []string) *core.ConfigMap
func (*Invocation) GetPersistentVolumeClaim ¶
func (i *Invocation) GetPersistentVolumeClaim() *core.PersistentVolumeClaim
func (*Invocation) MongoDBRS ¶
func (i *Invocation) MongoDBRS() *api.MongoDB
func (*Invocation) MongoDBShard ¶
func (i *Invocation) MongoDBShard() *api.MongoDB
func (*Invocation) MongoDBStandalone ¶
func (i *Invocation) MongoDBStandalone() *api.MongoDB
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) 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) RoleForMongoDB ¶
func (i *Invocation) RoleForMongoDB(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
type KubedbTable ¶
Click to show internal directories.
Click to hide internal directories.