framework

package
v0.13.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: Apache-2.0 Imports: 67 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const (
	GET    = "get"
	LIST   = "list"
	PATCH  = "patch"
	CREATE = "create"
	UPDATE = "update"
	DELETE = "delete"
	USE    = "use"

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

Variables

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

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

Functions

This section is empty.

Types

type Framework

type Framework struct {
	StorageClass string
	CertStore    *certstore.CertStore
	// 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) CheckPostgres

func (f *Framework) CheckPostgres(db *xorm.Engine) 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) CleanPostgres

func (f *Framework) CleanPostgres()

func (*Framework) CleanSnapshot

func (f *Framework) CleanSnapshot()

func (*Framework) CleanWorkloadLeftOvers

func (f *Framework) CleanWorkloadLeftOvers()

func (*Framework) CreateBackupSession

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

func (*Framework) CreateMinioSecret

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

func (*Framework) CreateNamespace

func (f *Framework) CreateNamespace() error

func (*Framework) CreatePostgres

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

func (*Framework) CreateRepository

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

func (*Framework) CreateServiceAccount

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

func (*Framework) CreateSnapshot

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

func (*Framework) CreateStashPGRoleBinding

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

func (*Framework) CreateStashPGServiceAccount

func (f *Framework) CreateStashPGServiceAccount(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) DeleteDeploymentForMinioServer

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

func (*Framework) DeleteDormantDatabase

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

func (*Framework) DeleteNamespace

func (f *Framework) DeleteNamespace() error

func (*Framework) DeletePVCForMinioServer

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

func (*Framework) DeletePostgres

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

func (*Framework) DeleteRepository

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

func (*Framework) DeleteRoleBinding

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

func (*Framework) DeleteSecret

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

func (*Framework) DeleteSecretForMinioServer

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

func (*Framework) DeleteServiceForMinioServer

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

func (*Framework) DeleteSnapshot

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

func (*Framework) DeleteStashPGRBAC

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

func (*Framework) EnsureStashPGRBAC

func (f *Framework) EnsureStashPGRBAC(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) EventuallyCountArchive

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

func (*Framework) EventuallyCountTable

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

func (*Framework) EventuallyCreateSchema

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

func (*Framework) EventuallyCreateTable

func (f *Framework) EventuallyCreateTable(meta metav1.ObjectMeta, dbName string, userName string, total int) 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) EventuallyJobPVCSize

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

func (*Framework) EventuallyJobVolumeEmptyDirSize

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

func (*Framework) EventuallyPGSettings

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

func (*Framework) EventuallyPVCCount

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

func (*Framework) EventuallyPingDatabase

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

func (*Framework) EventuallyPostgres

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

func (*Framework) EventuallyPostgresPhase

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

func (*Framework) EventuallyPostgresPodCount

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

func (*Framework) EventuallyPostgresRunning

func (f *Framework) EventuallyPostgresRunning(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) EventuallyWalDataFound

func (f *Framework) EventuallyWalDataFound(postgres *api.Postgres) 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) ForwardMinioPort

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

func (*Framework) ForwardPort

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

func (*Framework) FoundStashCRDs

func (f *Framework) FoundStashCRDs() bool

func (*Framework) GetDormantDatabase

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

func (*Framework) GetMinioPortForwardingEndPoint

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

func (*Framework) GetPostgres

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

func (*Framework) GetPostgresClient

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

func (*Framework) GetSnapshot

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

func (*Framework) Invoke

func (f *Framework) Invoke() *Invocation

func (*Framework) IsMinio

func (f *Framework) IsMinio() bool

func (*Framework) IsTLS

func (f *Framework) IsTLS() bool

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) PatchPostgres

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

func (*Framework) RunOperatorAndServer

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

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) App

func (fi *Invocation) App() string

func (*Invocation) BackupConfiguration

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

func (*Invocation) BackupSession

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

func (*Invocation) CreateBackupConfiguration

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

func (*Invocation) CreateBucket

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

func (*Invocation) CreateConfigMap

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

func (*Invocation) CreateDeploymentForMinioServer

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

func (*Invocation) CreateHTTPMinioServer

func (fi *Invocation) CreateHTTPMinioServer() error

func (*Invocation) CreateHTTPSMinioServer

func (fi *Invocation) CreateHTTPSMinioServer() error

func (*Invocation) CreateMinioBucket

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

func (*Invocation) CreateMinioServer

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

func (*Invocation) CreatePersistentVolumeClaim

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

func (*Invocation) CreateRestoreSession

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

func (*Invocation) CreateServiceForMinioServer

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

func (*Invocation) DeleteBackupConfiguration

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

func (*Invocation) DeleteMinioServer

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

func (*Invocation) DeletePersistentVolumeClaim

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

func (Invocation) DeleteRestoreSession

func (f Invocation) DeleteRestoreSession(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) MinioServerDeploymentHTTP

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

func (*Invocation) MinioServerDeploymentHTTPS

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

func (*Invocation) MinioServerSANs

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

func (*Invocation) MinioServiceAddress

func (fi *Invocation) MinioServiceAddress() string

func (*Invocation) PatchSecretForRestic

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

func (*Invocation) Postgres

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

func (*Invocation) Repository

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

func (*Invocation) RestoreSession

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

func (*Invocation) RoleBinding

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

func (*Invocation) RoleForPostgres

func (i *Invocation) RoleForPostgres(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) *core.Secret

func (*Invocation) SecretForDatabaseAuthenticationWithLabel

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

func (*Invocation) SecretForGCSBackend

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

func (*Invocation) SecretForLocalBackend

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

func (*Invocation) SecretForMinioBackend

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

func (*Invocation) SecretForMinioServer

func (i *Invocation) SecretForMinioServer() *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) ServiceForMinioServer

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

func (*Invocation) Snapshot

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

type PgStatArchiver

type PgStatArchiver struct {
	ArchivedCount int
}

Jump to

Keyboard shortcuts

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