Documentation ¶
Index ¶
- Constants
- Variables
- func WaitUntilPodRunningBySelector(kubeClient kubernetes.Interface, namespace string, ...) error
- type Framework
- func (f *Framework) AddMonitor(obj *api.PgBouncer)
- func (f *Framework) AddUserToUserListSecret(meta metav1.ObjectMeta, username, password string) error
- func (f *Framework) ApplyCMD(meta metav1.ObjectMeta, username, password, sqlCommand, dbName string) (string, error)
- func (f *Framework) CheckPgBouncerAppBindingSpec(meta metav1.ObjectMeta) error
- func (f *Framework) CheckPostgres(db *xorm.Engine) error
- func (f *Framework) CheckPostgresAppBindingSpec(meta metav1.ObjectMeta) error
- func (f *Framework) CheckSecret() error
- func (f *Framework) CheckStatefulSetPodStatus(statefulSet *apps.StatefulSet) error
- func (f *Framework) CheckTableViaPgBouncer(meta metav1.ObjectMeta, username, password, dbName string) error
- func (f *Framework) CheckUserListSecret(meta metav1.ObjectMeta) error
- func (f *Framework) CleanPgBouncer()
- func (f *Framework) CleanPostgres()
- func (f *Framework) CleanWorkloadLeftOvers()
- func (f *Framework) CreateDatabaseViaPgBouncer(meta metav1.ObjectMeta, username, password, dbName string) error
- func (f *Framework) CreateIssuer(obj *cm_api.Issuer) error
- func (f *Framework) CreateNamespace() error
- func (f *Framework) CreatePgBouncer(obj *api.PgBouncer) error
- func (f *Framework) CreatePostgres(obj *api.Postgres) error
- func (f *Framework) CreateSecret(obj *core.Secret) error
- func (f *Framework) CreateTableViaPgBouncer(meta metav1.ObjectMeta, username, password, dbName string) error
- func (f *Framework) CreateUserAndDatabaseViaPgBouncer(meta metav1.ObjectMeta) error
- func (f *Framework) CreateUserViaPgBouncer(meta metav1.ObjectMeta, username, password, dbName string) error
- func (f *Framework) DeleteConfigMap(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteIssuer(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteNamespace() error
- func (f *Framework) DeletePgBouncer(meta metav1.ObjectMeta) error
- func (f *Framework) DeletePostgres(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteSecret(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteUserListSecret(meta metav1.ObjectMeta) error
- func (f *Framework) DropTableViaPgBouncer(meta metav1.ObjectMeta, username, password, dbName string) error
- func (f *Framework) EventuallyAppBinding(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyCRD() GomegaAsyncAssertion
- func (f *Framework) EventuallyDBSecretCount(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyPVCCount(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyPgBouncer(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyPgBouncerPhase(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyPgBouncerPodCount(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyPgBouncerRunning(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyPingDatabase(meta metav1.ObjectMeta, dbName string, userName string) GomegaAsyncAssertion
- func (f *Framework) EventuallyPingPgBouncerServer(meta metav1.ObjectMeta) error
- func (f *Framework) EventuallyPingPgBouncerServerOverTLS(meta metav1.ObjectMeta) error
- func (f *Framework) EventuallyPodReadyForPgBouncer(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyPostgres(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyPostgresPhase(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyPostgresPodCount(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyPostgresRunning(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyWipedOut(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EvictPgBouncerPods(meta metav1.ObjectMeta) error
- func (f *Framework) EvictPodsFromStatefulSet(meta metav1.ObjectMeta) error
- func (f *Framework) ForwardPort(meta metav1.ObjectMeta, port *int) (*portforward.Tunnel, error)
- func (f *Framework) GetPgBouncer(meta metav1.ObjectMeta) (*api.PgBouncer, error)
- func (f *Framework) GetPostgres(meta metav1.ObjectMeta) (*api.Postgres, error)
- func (f *Framework) GetPostgresClient(tunnel *portforward.Tunnel, dbName string, userName string) (*xorm.Engine, error)
- func (f *Framework) GetPostgresCredentials() (string, string, error)
- func (f *Framework) GetUserListSecret() *core.Secret
- func (f *Framework) Invoke() *Invocation
- func (f *Framework) IssuerForPgBouncer(pbMeta, caSecretMeta metav1.ObjectMeta) *cm_api.Issuer
- func (f *Framework) Namespace() string
- func (f *Framework) PatchPgBouncer(meta metav1.ObjectMeta, ...) (*api.PgBouncer, error)
- func (f *Framework) PatchPostgres(meta metav1.ObjectMeta, transform func(postgres *api.Postgres) *api.Postgres) (*api.Postgres, error)
- func (f *Framework) PingPgBouncerServer(meta metav1.ObjectMeta) (bool, error)
- func (f *Framework) PingPgBouncerServerOverTLS(meta metav1.ObjectMeta) (bool, error)
- func (f *Framework) PoolViaPgBouncer(meta metav1.ObjectMeta) error
- func (f *Framework) PrintDebugHelpers()
- func (f *Framework) SelfSignedCASecret(meta metav1.ObjectMeta) *v1.Secret
- func (f *Framework) SetupPostgresResources(kubeconfigPath string)
- func (f *Framework) UpdateIssuer(meta metav1.ObjectMeta, transformer func(cm_api.Issuer) cm_api.Issuer) error
- func (f *Framework) UpdateSecret(meta metav1.ObjectMeta, transformer func(core.Secret) core.Secret) error
- func (f *Framework) VerifyExporter(meta metav1.ObjectMeta) error
- func (f *Framework) WaitUntilPostgresReady(name string) error
- func (f *Framework) WaitUntilPrimaryContainerReady(meta metav1.ObjectMeta) error
- type Invocation
- func (fi *Invocation) App() string
- func (f *Invocation) CreateConfigMap(obj *core.ConfigMap) error
- func (f *Invocation) CreatePersistentVolumeClaim(pvc *core.PersistentVolumeClaim) error
- func (f *Invocation) DeletePersistentVolumeClaim(meta metav1.ObjectMeta) error
- func (fi *Invocation) ExtClient() cs.Interface
- func (f *Invocation) GetCustomConfig(configs []string) *core.ConfigMap
- func (f *Invocation) GetPersistentVolumeClaim() *core.PersistentVolumeClaim
- func (i *Invocation) PgBouncer(secret *core.Secret) *api.PgBouncer
- func (i *Invocation) Postgres() *api.Postgres
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 (*Framework) AddMonitor ¶
func (*Framework) AddUserToUserListSecret ¶
func (f *Framework) AddUserToUserListSecret(meta metav1.ObjectMeta, username, password string) error
func (*Framework) CheckPgBouncerAppBindingSpec ¶
func (f *Framework) CheckPgBouncerAppBindingSpec(meta metav1.ObjectMeta) error
func (*Framework) CheckPostgresAppBindingSpec ¶
func (f *Framework) CheckPostgresAppBindingSpec(meta metav1.ObjectMeta) error
func (*Framework) CheckSecret ¶
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) CreateNamespace ¶
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 (*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 (*Framework) GetPostgres ¶
func (*Framework) GetPostgresClient ¶
func (*Framework) GetPostgresCredentials ¶
func (*Framework) GetUserListSecret ¶
func (*Framework) Invoke ¶
func (f *Framework) Invoke() *Invocation
func (*Framework) IssuerForPgBouncer ¶
func (f *Framework) IssuerForPgBouncer(pbMeta, caSecretMeta metav1.ObjectMeta) *cm_api.Issuer
func (*Framework) PatchPgBouncer ¶
func (*Framework) PatchPostgres ¶
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 (*Framework) UpdateIssuer ¶
func (*Framework) UpdateSecret ¶
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 (*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) Postgres ¶
func (i *Invocation) Postgres() *api.Postgres
Click to show internal directories.
Click to hide internal directories.