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

package framework

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

Index

Package Files

admission_controller.go appbinding.go crd.go database.go dormantdatabase.go framework.go minio.go namespace.go postgres.go pvc.go rbac.go secret.go snapshot.go stash.go util.go wal.go

Constants

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

    MINIO_ACCESS_KEY = "MINIO_ACCESS_KEY"
    MINIO_SECRET_KEY = "MINIO_SECRET_KEY"

    AWS_ACCESS_KEY_ID     = "AWS_ACCESS_KEY_ID"
    AWS_SECRET_ACCESS_KEY = "AWS_SECRET_ACCESS_KEY"

    MINIO_CERTS_MOUNTPATH = "/root/.minio/certs"
    StandardStorageClass  = "standard"
    MinioSecretHTTP       = "minio-secret-http"
    MinioSecretHTTPS      = "minio-secret-https"
    MinioPVC              = "minio-pv-claim"
    MinioServiceHTTP      = "minio-service-http"
    MinioServiceHTTPS     = "minio-service-https"
    MinioServerHTTP       = "minio-http"
    MinioServerHTTPS      = "minio-https"
    PORT                  = 443
    S3_BUCKET_NAME        = "S3_BUCKET_NAME"
)
const (
    GET    = "get"
    LIST   = "list"
    PATCH  = "patch"
    CREATE = "create"
    UPDATE = "update"
    DELETE = "delete"
    USE    = "use"

    APPS           = "apps"
    POLICY         = "policy"
    Role           = "Role"
    ServiceAccount = "ServiceAccount"
)

Variables

var (
    DockerRegistry     = "kubedbci"
    SelfHostedOperator = true
    DBCatalogName      = "10.2-v4"
)
var (
    TLS bool

    MinioWAL     = false
    MinioService = ""
)
var (
    JobPvcStorageSize = "2Gi"
    DBPvcStorageSize  = "1Gi"
)
var (
    CustomSecretSuffix = "custom-secret"
    CustomUsername     = "username1234567890"
    CustomPassword     = "password0987654321"
)
var (
    StashPgBackupTask  = "pg-backup-task"
    StashPgRestoreTask = "pg-restore-task"
    StashPgClusterRole = "pg-backup-restore"
    StashPgSA          = "pg-backup-restore"
    StashPgRoleBinding = "pg-backup-restore"
)

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,
) *Framework

func (*Framework) CheckAppBindingSpec Uses

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

func (*Framework) CheckPostgres Uses

func (f *Framework) CheckPostgres(db *xorm.Engine) error

func (*Framework) CheckSecret Uses

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

func (*Framework) CleanAdmissionConfigs Uses

func (f *Framework) CleanAdmissionConfigs()

func (*Framework) CleanDormantDatabase Uses

func (f *Framework) CleanDormantDatabase()

func (*Framework) CleanPostgres Uses

func (f *Framework) CleanPostgres()

func (*Framework) CleanSnapshot Uses

func (f *Framework) CleanSnapshot()

func (*Framework) CleanWorkloadLeftOvers Uses

func (f *Framework) CleanWorkloadLeftOvers()

func (*Framework) CreateBackupSession Uses

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

func (*Framework) CreateMinioSecret Uses

func (f *Framework) CreateMinioSecret(obj *core.Secret) (*core.Secret, error)

func (*Framework) CreateNamespace Uses

func (f *Framework) CreateNamespace() error

func (*Framework) CreatePostgres Uses

func (f *Framework) CreatePostgres(obj *api.Postgres) error

func (*Framework) CreateRepository Uses

func (f *Framework) CreateRepository(repo *stashV1alpha1.Repository) 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) CreateSnapshot Uses

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

func (*Framework) CreateStashPGRoleBinding Uses

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

func (*Framework) CreateStashPGServiceAccount Uses

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

func (*Framework) DeleteBackupSession Uses

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

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) DeleteDormantDatabase Uses

func (f *Framework) DeleteDormantDatabase(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) DeletePostgres Uses

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

func (*Framework) DeleteRepository Uses

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

func (*Framework) DeleteRoleBinding Uses

func (f *Framework) DeleteRoleBinding(obj *rbac.RoleBinding) 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) DeleteSnapshot Uses

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

func (*Framework) DeleteStashPGRBAC Uses

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

func (*Framework) EnsureStashPGRBAC Uses

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

func (*Framework) EventuallyAPIServiceReady Uses

func (f *Framework) EventuallyAPIServiceReady() GomegaAsyncAssertion

func (*Framework) EventuallyAppBinding Uses

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

func (*Framework) EventuallyBackupSessionPhase Uses

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

func (*Framework) EventuallyCRD Uses

func (f *Framework) EventuallyCRD() GomegaAsyncAssertion

func (*Framework) EventuallyCountArchive Uses

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

func (*Framework) EventuallyCountTable Uses

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

func (*Framework) EventuallyCreateSchema Uses

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

func (*Framework) EventuallyCreateTable Uses

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

func (*Framework) EventuallyDBSecretCount Uses

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

func (*Framework) EventuallyDormantDatabase Uses

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

func (*Framework) EventuallyDormantDatabaseStatus Uses

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

func (*Framework) EventuallyJobPVCSize Uses

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

func (*Framework) EventuallyJobVolumeEmptyDirSize Uses

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

func (*Framework) EventuallyPGSettings Uses

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

func (*Framework) EventuallyPVCCount Uses

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

func (*Framework) EventuallyPingDatabase Uses

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

func (*Framework) EventuallyPostgres Uses

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

func (*Framework) EventuallyPostgresPhase Uses

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

func (*Framework) EventuallyPostgresPodCount Uses

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

func (*Framework) EventuallyPostgresRunning Uses

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

func (*Framework) EventuallyRestoreSessionPhase Uses

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

func (*Framework) EventuallySnapshot Uses

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

func (*Framework) EventuallySnapshotCount Uses

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

func (*Framework) EventuallySnapshotDataFound Uses

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

func (*Framework) EventuallySnapshotPhase Uses

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

func (*Framework) EventuallyWalDataFound Uses

func (f *Framework) EventuallyWalDataFound(postgres *api.Postgres) GomegaAsyncAssertion

func (*Framework) EventuallyWipedOut Uses

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

func (*Framework) EvictPodsFromStatefulSet Uses

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

func (*Framework) ForwardMinioPort Uses

func (f *Framework) ForwardMinioPort(clientPodName string) (*portforward.Tunnel, error)

func (*Framework) ForwardPort Uses

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

func (*Framework) FoundStashCRDs Uses

func (f *Framework) FoundStashCRDs() bool

func (*Framework) GetDormantDatabase Uses

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

func (*Framework) GetMinioPortForwardingEndPoint Uses

func (f *Framework) GetMinioPortForwardingEndPoint() (*portforward.Tunnel, error)

func (*Framework) GetPostgres Uses

func (f *Framework) GetPostgres(meta metav1.ObjectMeta) (*api.Postgres, error)

func (*Framework) GetPostgresClient Uses

func (f *Framework) GetPostgresClient(tunnel *portforward.Tunnel, dbName string, userName string) (*xorm.Engine, error)

func (*Framework) GetSnapshot Uses

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

func (*Framework) Invoke Uses

func (f *Framework) Invoke() *Invocation

func (*Framework) IsMinio Uses

func (f *Framework) IsMinio() bool

func (*Framework) IsTLS Uses

func (f *Framework) IsTLS() bool

func (*Framework) Namespace Uses

func (f *Framework) Namespace() string

func (*Framework) PatchDormantDatabase Uses

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

func (*Framework) PatchPostgres Uses

func (f *Framework) PatchPostgres(meta metav1.ObjectMeta, transform func(postgres *api.Postgres) *api.Postgres) (*api.Postgres, error)

func (*Framework) RunOperatorAndServer Uses

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

func (*Framework) UpdateSecret Uses

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

type Invocation Uses

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

func (*Invocation) App Uses

func (fi *Invocation) App() string

func (*Invocation) BackupConfiguration Uses

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

func (*Invocation) BackupSession Uses

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

func (*Invocation) CreateBackupConfiguration Uses

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

func (*Invocation) CreateBucket Uses

func (fi *Invocation) CreateBucket(deployment *apps.Deployment, secret *core.Secret, tls bool) error

func (*Invocation) CreateConfigMap Uses

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

func (*Invocation) CreateDeploymentForMinioServer Uses

func (fi *Invocation) CreateDeploymentForMinioServer(obj *apps.Deployment) (*apps.Deployment, error)

func (*Invocation) CreateHTTPMinioServer Uses

func (fi *Invocation) CreateHTTPMinioServer() error

func (*Invocation) CreateHTTPSMinioServer Uses

func (fi *Invocation) CreateHTTPSMinioServer() error

func (*Invocation) CreateMinioBucket Uses

func (fi *Invocation) CreateMinioBucket(bucketName string, secret *core.Secret, endPoint string) error

func (*Invocation) CreateMinioServer Uses

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

func (*Invocation) CreatePersistentVolumeClaim Uses

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

func (*Invocation) CreateRestoreSession Uses

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

func (*Invocation) CreateServiceForMinioServer Uses

func (fi *Invocation) CreateServiceForMinioServer(obj core.Service) (*core.Service, error)

func (*Invocation) DeleteBackupConfiguration Uses

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

func (*Invocation) DeleteMinioServer Uses

func (fi *Invocation) DeleteMinioServer() (err error)

func (*Invocation) DeletePersistentVolumeClaim Uses

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

func (Invocation) DeleteRestoreSession Uses

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

func (*Invocation) ExtClient Uses

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

func (*Invocation) GetCustomConfig Uses

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

func (*Invocation) GetPersistentVolumeClaim Uses

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

func (*Invocation) MinioServerDeploymentHTTP Uses

func (fi *Invocation) MinioServerDeploymentHTTP() *apps.Deployment

func (*Invocation) MinioServerDeploymentHTTPS Uses

func (fi *Invocation) MinioServerDeploymentHTTPS(tls bool) *apps.Deployment

func (*Invocation) MinioServerSANs Uses

func (fi *Invocation) MinioServerSANs() cert.AltNames

func (*Invocation) MinioServiceAddress Uses

func (fi *Invocation) MinioServiceAddress() string

func (*Invocation) PatchSecretForRestic Uses

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

func (*Invocation) Postgres Uses

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

func (*Invocation) Repository Uses

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

func (*Invocation) RestoreSession Uses

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

func (*Invocation) RoleBinding Uses

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

func (*Invocation) RoleForPostgres Uses

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

func (*Invocation) RoleForSnapshot Uses

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

func (*Invocation) SecretForAzureBackend Uses

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

func (*Invocation) SecretForDatabaseAuthentication Uses

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

func (*Invocation) SecretForDatabaseAuthenticationWithLabel Uses

func (i *Invocation) SecretForDatabaseAuthenticationWithLabel(meta metav1.ObjectMeta) *core.Secret

func (*Invocation) SecretForGCSBackend Uses

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

func (*Invocation) SecretForLocalBackend Uses

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

func (*Invocation) SecretForMinioBackend Uses

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

func (*Invocation) SecretForMinioServer Uses

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

func (*Invocation) SecretForS3Backend Uses

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

func (*Invocation) SecretForSwiftBackend Uses

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

func (*Invocation) ServiceAccount Uses

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

func (*Invocation) ServiceForMinioServer Uses

func (fi *Invocation) ServiceForMinioServer() core.Service

func (*Invocation) Snapshot Uses

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

type PgStatArchiver Uses

type PgStatArchiver struct {
    ArchivedCount int
}

Package framework imports 67 packages (graph). Updated 2019-10-06. Refresh now. Tools for package owners.