framework

package
v0.1.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: 48 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReservePoolSize = 7

	MaxClientConnections = 20
)
View Source
const (
	IssuerName = "e2e-self-signed-issuer"
)
View Source
const (
	PgBouncerUserListSecret = "pb-userlist-secret"
)
View Source
const (
	PostgresName = "postgres-for-pgbouncer-test"
)

Variables

View Source
var (
	DockerRegistry = "kubedbci"
	DBCatalogName  = "10.2-v4"
)
View Source
var (
	DBPvcStorageSize = "1Gi"
)

Functions

func WaitUntilPodRunningBySelector

func WaitUntilPodRunningBySelector(kubeClient kubernetes.Interface, namespace string, selector *metav1.LabelSelector, count int) error

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,
	certManagerClient cm.Interface,
	storageClass string,

) *Framework

func (*Framework) AddMonitor

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

func (*Framework) AddUserToUserListSecret

func (f *Framework) AddUserToUserListSecret(meta metav1.ObjectMeta, username, password string) error

func (*Framework) ApplyCMD

func (f *Framework) ApplyCMD(meta metav1.ObjectMeta, username, password, sqlCommand, dbName string) (string, error)

func (*Framework) CheckPgBouncerAppBindingSpec

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

func (*Framework) CheckPostgres

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

func (*Framework) CheckPostgresAppBindingSpec

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

func (*Framework) CheckSecret

func (f *Framework) CheckSecret() error

func (*Framework) CheckStatefulSetPodStatus

func (f *Framework) CheckStatefulSetPodStatus(statefulSet *apps.StatefulSet) error

func (*Framework) CheckTableViaPgBouncer

func (f *Framework) CheckTableViaPgBouncer(meta metav1.ObjectMeta, username, password, dbName string) error

func (*Framework) CheckUserListSecret

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

func (*Framework) CleanPgBouncer

func (f *Framework) CleanPgBouncer()

func (*Framework) CleanPostgres

func (f *Framework) CleanPostgres()

func (*Framework) CleanWorkloadLeftOvers

func (f *Framework) CleanWorkloadLeftOvers()

func (*Framework) CreateDatabaseViaPgBouncer

func (f *Framework) CreateDatabaseViaPgBouncer(meta metav1.ObjectMeta, username, password, dbName string) error

func (*Framework) CreateIssuer

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

func (*Framework) CreateNamespace

func (f *Framework) CreateNamespace() error

func (*Framework) CreatePgBouncer

func (f *Framework) CreatePgBouncer(obj *api.PgBouncer) error

func (*Framework) CreatePostgres

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

func (*Framework) CreateSecret

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

func (*Framework) CreateTableViaPgBouncer

func (f *Framework) CreateTableViaPgBouncer(meta metav1.ObjectMeta, username, password, dbName string) error

func (*Framework) CreateUserAndDatabaseViaPgBouncer

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

func (*Framework) CreateUserViaPgBouncer

func (f *Framework) CreateUserViaPgBouncer(meta metav1.ObjectMeta, username, password, dbName string) error

func (*Framework) DeleteConfigMap

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

func (*Framework) DeleteIssuer

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

func (*Framework) DeleteNamespace

func (f *Framework) DeleteNamespace() error

func (*Framework) DeletePgBouncer

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

func (*Framework) DeletePostgres

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

func (*Framework) DeleteSecret

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

func (*Framework) DeleteUserListSecret

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

func (*Framework) DropTableViaPgBouncer

func (f *Framework) DropTableViaPgBouncer(meta metav1.ObjectMeta, username, password, dbName string) error

func (*Framework) EventuallyAppBinding

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

func (*Framework) EventuallyCRD

func (f *Framework) EventuallyCRD() GomegaAsyncAssertion

func (*Framework) EventuallyDBSecretCount

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

func (*Framework) EventuallyPVCCount

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

func (*Framework) EventuallyPgBouncer

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

func (*Framework) EventuallyPgBouncerPhase

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

func (*Framework) EventuallyPgBouncerPodCount

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

func (*Framework) EventuallyPgBouncerRunning

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

func (*Framework) EventuallyPingDatabase

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

func (*Framework) EventuallyPingPgBouncerServer

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

func (*Framework) EventuallyPingPgBouncerServerOverTLS

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

func (*Framework) EventuallyPodReadyForPgBouncer

func (f *Framework) EventuallyPodReadyForPgBouncer(meta metav1.ObjectMeta) 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) EventuallyWipedOut

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

func (*Framework) EvictPgBouncerPods

func (f *Framework) EvictPgBouncerPods(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, port *int) (*portforward.Tunnel, error)

func (*Framework) GetPgBouncer

func (f *Framework) GetPgBouncer(meta metav1.ObjectMeta) (*api.PgBouncer, 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) GetPostgresCredentials

func (f *Framework) GetPostgresCredentials() (string, string, error)

func (*Framework) GetUserListSecret

func (f *Framework) GetUserListSecret() *core.Secret

func (*Framework) Invoke

func (f *Framework) Invoke() *Invocation

func (*Framework) IssuerForPgBouncer

func (f *Framework) IssuerForPgBouncer(pbMeta, caSecretMeta metav1.ObjectMeta) *cm_api.Issuer

func (*Framework) Namespace

func (f *Framework) Namespace() string

func (*Framework) PatchPgBouncer

func (f *Framework) PatchPgBouncer(meta metav1.ObjectMeta, transform func(pgbouncer *api.PgBouncer) *api.PgBouncer) (*api.PgBouncer, error)

func (*Framework) PatchPostgres

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

func (*Framework) PingPgBouncerServer

func (f *Framework) PingPgBouncerServer(meta metav1.ObjectMeta) (bool, error)

func (*Framework) PingPgBouncerServerOverTLS

func (f *Framework) PingPgBouncerServerOverTLS(meta metav1.ObjectMeta) (bool, error)

func (*Framework) PoolViaPgBouncer

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

func (*Framework) PrintDebugHelpers

func (f *Framework) PrintDebugHelpers()

func (*Framework) SelfSignedCASecret

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

func (*Framework) SetupPostgresResources

func (f *Framework) SetupPostgresResources(kubeconfigPath string)

func (*Framework) UpdateIssuer

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

func (*Framework) UpdateSecret

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

func (*Framework) VerifyExporter

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

func (f *Framework) WaitUntilPostgresReady(name string) error

func (*Framework) WaitUntilPrimaryContainerReady

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

type Invocation

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

func (*Invocation) App

func (fi *Invocation) App() string

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

func (i *Invocation) PgBouncer(secret *core.Secret) *api.PgBouncer

func (*Invocation) Postgres

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

Jump to

Keyboard shortcuts

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