framework

package
v0.0.0-...-85ffd96 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2019 License: Apache-2.0 Imports: 55 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MongodbUser             = "root"
	MongodbPassword         = "root"
	MongodbCredentialSecret = "mongodb-credential-secret"
)
View Source
const (
	MysqlUser             = "root"
	MysqlPassword         = "root"
	MysqlCredentialSecret = "mysql-db-credential-secret"
)
View Source
const (
	PostgresUser             = "postgres"
	PostgresPassword         = "root"
	PostgresCredentialSecret = "pg-cred-secret"
)
View Source
const (
	VaultTokenSecret = "vault-token"
)

Variables

View Source
var (
	MongodbServiceName    = rand.WithUniqSuffix("test-svc-mongodb")
	MongodbDeploymentName = rand.WithUniqSuffix("test-mongodb-deploy")
)

Functions

func EnsureKubernetesAuth

func EnsureKubernetesAuth(vc *vaultapi.Client) error

Types

type Framework

type Framework struct {
	KubeClient   kubernetes.Interface
	CSClient     cs.Interface
	AppcatClient appcat_cs.AppcatalogV1alpha1Interface
	KAClient     ka.Interface

	CertStore       *certstore.CertStore
	WebhookEnabled  bool
	ClientConfig    *rest.Config
	RunDynamoDBTest bool
	DBClient        db_cs.Interface

	VaultAppRef    *appcat.AppReference
	MongoAppRef    *appcat.AppReference
	MysqlAppRef    *appcat.AppReference
	PostgresAppRef *appcat.AppReference
	// contains filtered or unexported fields
}

func New

func New(kubeClient kubernetes.Interface, extClient cs.Interface, appc appcat_cs.AppcatalogV1alpha1Interface, dbClient db_cs.Interface, kaClient ka.Interface, webhookEnabled bool, clientConfig *rest.Config, runDynamoDBTest bool) *Framework

func (*Framework) CleanAdmissionConfigs

func (f *Framework) CleanAdmissionConfigs()

func (*Framework) Cleanup

func (f *Framework) Cleanup() error

func (*Framework) CreateAppBinding

func (f *Framework) CreateAppBinding(a *appcat.AppBinding) error

func (*Framework) CreateConfigMap

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

func (*Framework) CreateDeployment

func (f *Framework) CreateDeployment(obj apps.Deployment) (*apps.Deployment, error)

func (*Framework) CreateNamespace

func (f *Framework) CreateNamespace() error

func (*Framework) CreateSecret

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

func (*Framework) CreateSecretWithData

func (f *Framework) CreateSecretWithData(name, namespace string, data map[string][]byte) error

func (*Framework) CreateService

func (f *Framework) CreateService(obj core.Service) error

func (*Framework) CreateVaultPolicy

func (f *Framework) CreateVaultPolicy(obj *api.VaultPolicy) (*api.VaultPolicy, error)

func (*Framework) CreateVaultPolicyBinding

func (f *Framework) CreateVaultPolicyBinding(obj *api.VaultPolicyBinding) (*api.VaultPolicyBinding, error)

func (*Framework) CreateVaultServer

func (f *Framework) CreateVaultServer(obj *api.VaultServer) (*api.VaultServer, error)

func (*Framework) CreateVaultserverVersion

func (f *Framework) CreateVaultserverVersion() error

func (*Framework) DeleteAppBinding

func (f *Framework) DeleteAppBinding(name, namespace string) error

func (*Framework) DeleteConfigMap

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

func (*Framework) DeleteDeployment

func (f *Framework) DeleteDeployment(name, namespace string) error

func (*Framework) DeleteEtcd

func (f *Framework) DeleteEtcd() error

func (*Framework) DeleteMongodb

func (f *Framework) DeleteMongodb() error

func (*Framework) DeleteMySQLForVault

func (f *Framework) DeleteMySQLForVault() error

func (*Framework) DeleteMysql

func (f *Framework) DeleteMysql() error

func (*Framework) DeleteNamespace

func (f *Framework) DeleteNamespace() error

func (*Framework) DeletePod

func (f *Framework) DeletePod(name, namespace string) error

func (*Framework) DeletePostgres

func (f *Framework) DeletePostgres() error

func (*Framework) DeletePostgresSQL

func (f *Framework) DeletePostgresSQL() error

func (*Framework) DeleteSecret

func (f *Framework) DeleteSecret(name, namespace string) error

func (*Framework) DeleteService

func (f *Framework) DeleteService(name, namespace string) error

func (*Framework) DeleteVault

func (f *Framework) DeleteVault() error

func (*Framework) DeleteVaultPolicy

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

func (*Framework) DeleteVaultPolicyBinding

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

func (*Framework) DeleteVaultServer

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

func (*Framework) DeleteVaultserverVersion

func (f *Framework) DeleteVaultserverVersion() error

func (*Framework) DeployEtcd

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

func (*Framework) DeployMongodb

func (f *Framework) DeployMongodb() (*appcat.AppReference, error)

DeployMongodb will do:

  • create service
  • create deployment
  • create credential secret

func (*Framework) DeployMySQLForVault

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

func (*Framework) DeployMysql

func (f *Framework) DeployMysql() (*appcat.AppReference, error)

DeployMysql will do:

  • create service
  • create deployment
  • create credential secret

func (*Framework) DeployPostgres

func (f *Framework) DeployPostgres() (*appcat.AppReference, error)

DeployPostgres will do:

  • create service
  • create deployment
  • create credential secret

func (*Framework) DeployPostgresSQL

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

func (*Framework) DeployVault

func (f *Framework) DeployVault() (*appcat.AppReference, error)

DeployVault will do

  • create service
  • create deployment
  • create vault token secret

func (*Framework) DynamoDBCreateTable

func (f *Framework) DynamoDBCreateTable(region, table string, readCapacity, writeCapacity int) error

func (*Framework) DynamoDBDeleteTable

func (f *Framework) DynamoDBDeleteTable(region, table string) error

func (*Framework) EventuallyAPIServerReady

func (f *Framework) EventuallyAPIServerReady() GomegaAsyncAssertion

func (*Framework) EventuallyConfigMap

func (f *Framework) EventuallyConfigMap(name, namespace string) GomegaAsyncAssertion

func (*Framework) EventuallyDeployment

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

func (*Framework) EventuallySecret

func (f *Framework) EventuallySecret(name, namespace string) GomegaAsyncAssertion

func (*Framework) EventuallyVaultPolicy

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

func (*Framework) EventuallyVaultPolicyBinding

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

func (*Framework) EventuallyVaultServer

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

func (*Framework) ExecOnPod

func (f *Framework) ExecOnPod(pod *core.Pod, command ...string) (string, error)

func (*Framework) GetAppBinding

func (f *Framework) GetAppBinding(name, namespace string) (*appcat.AppBinding, error)

func (*Framework) GetNodePortIP

func (f *Framework) GetNodePortIP(label map[string]string) (string, error)

func (*Framework) GetVaultPolicy

func (f *Framework) GetVaultPolicy(obj *api.VaultPolicy) (*api.VaultPolicy, error)

func (*Framework) GetVaultPolicyBinding

func (f *Framework) GetVaultPolicyBinding(obj *api.VaultPolicyBinding) (*api.VaultPolicyBinding, error)

func (*Framework) GetVaultServer

func (f *Framework) GetVaultServer(obj *api.VaultServer) (*api.VaultServer, error)

func (*Framework) InitialSetup

func (f *Framework) InitialSetup() error

func (*Framework) Invoke

func (f *Framework) Invoke() *Invocation

func (*Framework) Namespace

func (f *Framework) Namespace() string

func (*Framework) NewTestVaultServerOptions

func (f *Framework) NewTestVaultServerOptions(kubeConfigPath string, controllerOptions *srvr.ExtraOptions) *srvr.VaultServerOptions

func (*Framework) StartAPIServerAndOperator

func (f *Framework) StartAPIServerAndOperator(config *restclient.Config, kubeConfigPath string, ctrlOptions *srvr.ExtraOptions)

func (*Framework) UpdateAWSAccessKeyRequestStatus

func (f *Framework) UpdateAWSAccessKeyRequestStatus(status *api.AWSAccessKeyRequestStatus, dbAReq *api.AWSAccessKeyRequest) error

func (*Framework) UpdateAzureAccessKeyRequestStatus

func (f *Framework) UpdateAzureAccessKeyRequestStatus(status *api.AzureAccessKeyRequestStatus, azureAReq *api.AzureAccessKeyRequest) error

func (*Framework) UpdateDatabaseAccessRequestStatus

func (f *Framework) UpdateDatabaseAccessRequestStatus(status *api.DatabaseAccessRequestStatus, dbAReq *api.DatabaseAccessRequest) error

func (*Framework) UpdateGCPAccessKeyRequestStatus

func (f *Framework) UpdateGCPAccessKeyRequestStatus(status *api.GCPAccessKeyRequestStatus, dbAReq *api.GCPAccessKeyRequest) error

func (*Framework) UpdateVaultPolicy

func (f *Framework) UpdateVaultPolicy(obj *api.VaultPolicy) (*api.VaultPolicy, error)

func (*Framework) UpdateVaultPolicyBinding

func (f *Framework) UpdateVaultPolicyBinding(obj *api.VaultPolicyBinding) (*api.VaultPolicyBinding, error)

func (*Framework) UpdateVaultServer

func (f *Framework) UpdateVaultServer(obj *api.VaultServer) (*api.VaultServer, error)

type Invocation

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

func (*Invocation) VaultPolicy

func (f *Invocation) VaultPolicy(policy string, ref *appcat.AppReference) *api.VaultPolicy

func (*Invocation) VaultPolicyBinding

func (f *Invocation) VaultPolicyBinding(policies, saNames, saNamespaces []string) *api.VaultPolicyBinding

func (*Invocation) VaultServer

func (f *Invocation) VaultServer(node int32, bs api.BackendStorageSpec) *api.VaultServer

func (*Invocation) VaultServerWithUnsealer

func (f *Invocation) VaultServerWithUnsealer(node int32, bs api.BackendStorageSpec, us api.UnsealerSpec) *api.VaultServer

Jump to

Keyboard shortcuts

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