mongodb: kubedb.dev/mongodb/test/e2e/framework Index | Files

package framework

import "kubedb.dev/mongodb/test/e2e/framework"

Index

Package Files

appbinding.go cert_manager.go certificate.go configmap.go crd.go database.go framework.go minio_server.go mongodb.go namespace.go pvc.go rbac.go secret.go stash.go util.go

Constants

const (
    MINIO_PUBLIC_CRT_NAME  = "public.crt"
    MINIO_PRIVATE_KEY_NAME = "private.key"

    MINIO_ACCESS_KEY_ID     = "not@id"
    MINIO_SECRET_ACCESS_KEY = "not@secret"

    MINIO_CERTS_MOUNTPATH = "/root/.minio/certs"
    StandardStorageClass  = "standard"

    MinioServer       = "minio-server"
    MinioServerSecret = "minio-server-secret"
    MinioPVCStorage   = "minio-pvc-storage"
    MinioService      = "minio-service"
    LocalHostIP       = "127.0.0.1"
)
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"
)
const (
    StorageProviderGCS   = "gcs"
    StorageProviderAzure = "azure"
    StorageProviderS3    = "s3"
    StorageProviderMinio = "minio"
    StorageProviderSwift = "swift"
)
const (
    IssuerName = "e2e-self-signed-issuer"
)

Variables

var (
    DockerRegistry  = "kubedbci"
    DBCatalogName   = "4.1.13-v1"
    StorageProvider string
)
var (
    JobPvcStorageSize = "2Gi"
    DBPvcStorageSize  = "1Gi"
)

func ClusterAuthModeP Uses

func ClusterAuthModeP(v api.ClusterAuthMode) *api.ClusterAuthMode

ClusterAuthModeP returns a pointer to the int32 value passed in.

func IsRepSet Uses

func IsRepSet(db *api.MongoDB) bool

func SSLModeP Uses

func SSLModeP(v api.SSLMode) *api.SSLMode

SSLModeP returns a pointer to the int32 value passed in.

type Framework Uses

type Framework struct {
    StorageClass string
    CertStore    *certstore.CertStore
    // contains filtered or unexported fields
}

func New Uses

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,
    certManagerClient cm.Interface,
) (*Framework, error)

func (*Framework) AddMonitor Uses

func (f *Framework) AddMonitor(obj *api.MongoDB)

func (*Framework) CheckAppBindingSpec Uses

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

func (*Framework) CheckSecret Uses

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

func (*Framework) CleanMongoDB Uses

func (f *Framework) CleanMongoDB()

func (*Framework) CleanWorkloadLeftOvers Uses

func (f *Framework) CleanWorkloadLeftOvers()

func (*Framework) ConnectAndPing Uses

func (f *Framework) ConnectAndPing(meta metav1.ObjectMeta, clientPodName string, isReplSet ...bool) (*mongo.Client, *portforward.Tunnel, error)

func (*Framework) CreateBackupConfiguration Uses

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

func (*Framework) CreateDeploymentForMinioServer Uses

func (f *Framework) CreateDeploymentForMinioServer(obj apps.Deployment) error

func (*Framework) CreateIssuer Uses

func (f *Framework) CreateIssuer(obj *cm_api.Issuer) error

func (*Framework) CreateMinioServer Uses

func (f *Framework) CreateMinioServer(tls bool, ips []net.IP) (string, error)

func (*Framework) CreateNamespace Uses

func (f *Framework) CreateNamespace() error

func (*Framework) CreatePersistentVolumeClaimForMinioServer Uses

func (f *Framework) CreatePersistentVolumeClaimForMinioServer(obj core.PersistentVolumeClaim) error

func (*Framework) CreateRepository Uses

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

func (*Framework) CreateRestoreSession Uses

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

func (*Framework) CreateRole Uses

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

func (*Framework) CreateRoleBinding Uses

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

func (*Framework) CreateSecret Uses

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

func (*Framework) CreateServiceAccount Uses

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

func (*Framework) CreateServiceForMinioServer Uses

func (f *Framework) CreateServiceForMinioServer(obj core.Service) (*core.Service, error)

func (*Framework) DeleteAppBinding Uses

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

DeleteAppBinding deletes the custom appBinding that is created in test

func (*Framework) DeleteBackupConfiguration Uses

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

func (*Framework) DeleteCASecret Uses

func (f *Framework) DeleteCASecret(clientCASecret *v1.Secret)

func (*Framework) DeleteConfigMap Uses

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

func (*Framework) DeleteDeploymentForMinioServer Uses

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

func (*Framework) DeleteGarbageCASecrets Uses

func (f *Framework) DeleteGarbageCASecrets(secretList []*v1.Secret)

func (*Framework) DeleteIssuer Uses

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

func (*Framework) DeleteMinioServer Uses

func (f *Framework) DeleteMinioServer() error

func (*Framework) DeleteMongoDB Uses

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

func (*Framework) DeleteNamespace Uses

func (f *Framework) DeleteNamespace() error

func (*Framework) DeletePVCForMinioServer Uses

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

func (*Framework) DeleteRepository Uses

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

func (Framework) DeleteRestoreSession Uses

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

func (*Framework) DeleteSecret Uses

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

func (*Framework) DeleteSecretForMinioServer Uses

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

func (*Framework) DeleteServiceForMinioServer Uses

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

func (*Framework) DeploymentForMinioServer Uses

func (f *Framework) DeploymentForMinioServer() apps.Deployment

func (*Framework) EnsureCustomAppBinding Uses

func (f *Framework) EnsureCustomAppBinding(db *api.MongoDB, customAppBindingName string) error

EnsureCustomAppBinding creates custom Appbinding for mongodb. In this custom appbinding, all fields are similar to actual appbinding object, except Spec.Parameters.

func (*Framework) EventuallyAppBinding Uses

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

func (*Framework) EventuallyCRD Uses

func (f *Framework) EventuallyCRD() GomegaAsyncAssertion

func (*Framework) EventuallyCollectionPartitioned Uses

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 Uses

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

func (*Framework) EventuallyDocumentExists Uses

func (f *Framework) EventuallyDocumentExists(meta metav1.ObjectMeta, dbName string, collectionCount int) GomegaAsyncAssertion

func (*Framework) EventuallyEnableSharding Uses

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 Uses

func (f *Framework) EventuallyInsertDocument(meta metav1.ObjectMeta, dbName string, collectionCount int) GomegaAsyncAssertion

func (*Framework) EventuallyMaxIncomingConnections Uses

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

func (*Framework) EventuallyMongoDB Uses

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

func (*Framework) EventuallyMongoDBPhase Uses

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

func (*Framework) EventuallyMongoDBRunning Uses

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

func (*Framework) EventuallyPVCCount Uses

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

func (*Framework) EventuallyPingMongo Uses

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

func (*Framework) EventuallyRestoreSessionPhase Uses

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

func (*Framework) EventuallySnapshotInRepository Uses

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

func (*Framework) EventuallyUserSSLSettings Uses

func (f *Framework) EventuallyUserSSLSettings(meta metav1.ObjectMeta, clusterAuthMode *v1alpha1.ClusterAuthMode, sslMode *v1alpha1.SSLMode) GomegaAsyncAssertion

func (*Framework) EventuallyWipedOut Uses

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

func (*Framework) EvictPodsFromDeployment Uses

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

func (*Framework) EvictPodsFromStatefulSet Uses

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

func (*Framework) ForwardPort Uses

func (f *Framework) ForwardPort(meta metav1.ObjectMeta, clientPodName string) (*portforward.Tunnel, error)

func (*Framework) ForwardToPort Uses

func (f *Framework) ForwardToPort(meta metav1.ObjectMeta, clientPodName string, port *int) (*portforward.Tunnel, error)

func (*Framework) FoundStashCRDs Uses

func (f *Framework) FoundStashCRDs() bool

func (*Framework) GetMinioServiceName Uses

func (f *Framework) GetMinioServiceName() string

func (*Framework) GetMongoDB Uses

func (f *Framework) GetMongoDB(meta metav1.ObjectMeta) (*api.MongoDB, error)

func (*Framework) GetMongoDBClient Uses

func (f *Framework) GetMongoDBClient(meta metav1.ObjectMeta, tunnel *portforward.Tunnel, isReplSet ...bool) (*options.ClientOptions, error)

func (*Framework) GetMongoDBRootPassword Uses

func (f *Framework) GetMongoDBRootPassword(mongodb *api.MongoDB) (string, error)

func (*Framework) GetMongoDBVersion Uses

func (f *Framework) GetMongoDBVersion(name string) (*v1alpha1.MongoDBVersion, error)

func (*Framework) GetMongosPodName Uses

func (f *Framework) GetMongosPodName(meta metav1.ObjectMeta) (string, error)

func (*Framework) GetPrimaryInstance Uses

func (f *Framework) GetPrimaryInstance(meta metav1.ObjectMeta) (string, error)

func (*Framework) GetReplicaMasterNode Uses

func (f *Framework) GetReplicaMasterNode(meta metav1.ObjectMeta, nodeName string, replicaNumber *int32) (string, error)

func (*Framework) GetSSLCertificate Uses

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

GetSSLCertificate gets ssl certificate of mongodb and creates a client certificate in certPath

func (*Framework) Invoke Uses

func (f *Framework) Invoke() *Invocation

func (*Framework) IssuerForMongoDB Uses

func (f *Framework) IssuerForMongoDB(mgoMeta, caSecretMeta metav1.ObjectMeta) *cm_api.Issuer

func (*Framework) MinioServerSANs Uses

func (f *Framework) MinioServerSANs(ips []net.IP) cert.AltNames

func (*Framework) MinioServiceAddres Uses

func (f *Framework) MinioServiceAddres() string

func (*Framework) Namespace Uses

func (f *Framework) Namespace() string

func (*Framework) PVCForMinioServer Uses

func (f *Framework) PVCForMinioServer() core.PersistentVolumeClaim

func (*Framework) PatchMongoDB Uses

func (f *Framework) PatchMongoDB(meta metav1.ObjectMeta, transform func(*api.MongoDB) *api.MongoDB) (*api.MongoDB, error)

func (*Framework) PauseBackupConfiguration Uses

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

func (*Framework) PrintDebugHelpers Uses

func (f *Framework) PrintDebugHelpers()

func (*Framework) RemoveSecretVolumeMount Uses

func (f *Framework) RemoveSecretVolumeMount(containers []core.Container) []core.Container

func (*Framework) SecretForMinioServer Uses

func (f *Framework) SecretForMinioServer(ips []net.IP) core.Secret

func (*Framework) SelfSignedCASecret Uses

func (f *Framework) SelfSignedCASecret(meta metav1.ObjectMeta) *v1.Secret

func (*Framework) ServiceForMinioServer Uses

func (f *Framework) ServiceForMinioServer() core.Service

func (*Framework) UpdateIssuer Uses

func (f *Framework) UpdateIssuer(meta metav1.ObjectMeta, transformer func(cm_api.Issuer) cm_api.Issuer) error

func (*Framework) UpdateSecret Uses

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

func (*Framework) VerifyExporter Uses

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

VerifyExporter uses metrics from given URL and check against known key and value to verify the connection is functioning as intended

func (*Framework) VerifyShardExporters Uses

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

type Invocation Uses

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

func (*Invocation) BackupConfiguration Uses

func (i *Invocation) BackupConfiguration(dbMeta metav1.ObjectMeta, repo *stashV1alpha1.Repository) *stashv1beta1.BackupConfiguration

func (*Invocation) ConfigMapForInitialization Uses

func (i *Invocation) ConfigMapForInitialization() *core.ConfigMap

func (*Invocation) CreateConfigMap Uses

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

func (*Invocation) CreateMongoDB Uses

func (i *Invocation) CreateMongoDB(obj *api.MongoDB) error

func (*Invocation) CreatePersistentVolumeClaim Uses

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

func (*Invocation) DBClient Uses

func (i *Invocation) DBClient() cs.Interface

func (*Invocation) DeletePersistentVolumeClaim Uses

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

func (*Invocation) GetCustomConfig Uses

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

func (*Invocation) GetPersistentVolumeClaim Uses

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

func (*Invocation) MongoDBRS Uses

func (i *Invocation) MongoDBRS() *api.MongoDB

func (*Invocation) MongoDBShard Uses

func (i *Invocation) MongoDBShard() *api.MongoDB

func (*Invocation) MongoDBStandalone Uses

func (i *Invocation) MongoDBStandalone() *api.MongoDB

func (*Invocation) MongoDBWithFlexibleProbeTimeout Uses

func (i *Invocation) MongoDBWithFlexibleProbeTimeout(db *api.MongoDB) *api.MongoDB

func (*Invocation) PatchSecretForRestic Uses

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

func (*Invocation) Repository Uses

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

func (*Invocation) RestoreSession Uses

func (i *Invocation) RestoreSession(dbMeta metav1.ObjectMeta, repo *stashV1alpha1.Repository) *stashv1beta1.RestoreSession

func (*Invocation) RoleBinding Uses

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

func (*Invocation) RoleForMongoDB Uses

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

func (*Invocation) RoleForSnapshot Uses

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

func (*Invocation) SecretForBackend Uses

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

func (*Invocation) SecretForDatabaseAuthentication Uses

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

func (*Invocation) ServiceAccount Uses

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

type KubedbTable Uses

type KubedbTable struct {
    FirstName string
    LastName  string
}

Package framework imports 70 packages (graph). Updated 2020-07-09. Refresh now. Tools for package owners.