Documentation ¶
Index ¶
- Constants
- Variables
- func EnsureKubernetesAuth(vc *vaultapi.Client) error
- type Framework
- func (f *Framework) CleanAdmissionConfigs()
- func (f *Framework) CleanUpVaultServer() error
- func (f *Framework) Cleanup() error
- func (f *Framework) CreateAppBinding(a *appcat.AppBinding) error
- func (f *Framework) CreateConfigMap(obj core.ConfigMap) error
- func (f *Framework) CreateDeployment(obj apps.Deployment) (*apps.Deployment, error)
- func (f *Framework) CreateLocalRef2AppRef(namespace string, reference *v1.LocalObjectReference) *appcat.AppReference
- func (f *Framework) CreateNamespace() error
- func (f *Framework) CreateSecret(obj core.Secret) error
- func (f *Framework) CreateSecretWithData(name, namespace string, data map[string][]byte) error
- func (f *Framework) CreateService(obj core.Service) error
- func (f *Framework) CreateVaultPolicy(obj *api.VaultPolicy) (*api.VaultPolicy, error)
- func (f *Framework) CreateVaultPolicyBinding(obj *api.VaultPolicyBinding) (*api.VaultPolicyBinding, error)
- func (f *Framework) CreateVaultServer(obj *api.VaultServer) (*api.VaultServer, error)
- func (f *Framework) CreateVaultserverVersion() error
- func (f *Framework) DeleteAppBinding(name, namespace string) error
- func (f *Framework) DeleteConfigMap(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteDeployment(name, namespace string) error
- func (f *Framework) DeleteEtcd() error
- func (f *Framework) DeleteMongodb() error
- func (f *Framework) DeleteMySQLForVault() error
- func (f *Framework) DeleteMysql() error
- func (f *Framework) DeleteNamespace() error
- func (f *Framework) DeletePod(name, namespace string) error
- func (f *Framework) DeletePostgres() error
- func (f *Framework) DeletePostgresSQL() error
- func (f *Framework) DeleteSecret(name, namespace string) error
- func (f *Framework) DeleteService(name, namespace string) error
- func (f *Framework) DeleteVault() error
- func (f *Framework) DeleteVaultPolicy(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteVaultPolicyBinding(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteVaultServer(meta metav1.ObjectMeta) error
- func (f *Framework) DeleteVaultServerObj(obj *api.VaultServer) error
- func (f *Framework) DeleteVaultserverVersion() error
- func (f *Framework) DeployEtcd() (string, error)
- func (f *Framework) DeployMongodb() (*appcat.AppReference, error)
- func (f *Framework) DeployMySQLForVault() (string, error)
- func (f *Framework) DeployMysql() (*appcat.AppReference, error)
- func (f *Framework) DeployPostgres() (*appcat.AppReference, error)
- func (f *Framework) DeployPostgresSQL() (string, error)
- func (f *Framework) DeployVault() (*appcat.AppReference, error)
- func (f *Framework) DeployVaultServer() (*appcat.AppReference, error)
- func (f *Framework) DynamoDBCreateTable(region, table string, readCapacity, writeCapacity int) error
- func (f *Framework) DynamoDBDeleteTable(region, table string) error
- func (f *Framework) EventuallyAPIServerReady() GomegaAsyncAssertion
- func (f *Framework) EventuallyConfigMap(name, namespace string) GomegaAsyncAssertion
- func (f *Framework) EventuallyDeployment(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallySecret(name, namespace string) GomegaAsyncAssertion
- func (f *Framework) EventuallyVaultPolicy(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyVaultPolicyBinding(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) EventuallyVaultServer(meta metav1.ObjectMeta) GomegaAsyncAssertion
- func (f *Framework) ExecOnPod(pod *core.Pod, command ...string) (string, error)
- func (f *Framework) GetAppBinding(name, namespace string) (*appcat.AppBinding, error)
- func (f *Framework) GetNodePortIP(label map[string]string) (string, error)
- func (f *Framework) GetVaultPolicy(obj *api.VaultPolicy) (*api.VaultPolicy, error)
- func (f *Framework) GetVaultPolicyBinding(obj *api.VaultPolicyBinding) (*api.VaultPolicyBinding, error)
- func (f *Framework) GetVaultServer(obj *api.VaultServer) (*api.VaultServer, error)
- func (f *Framework) InitialSetup() error
- func (f *Framework) Invoke() *Invocation
- func (f *Framework) Namespace() string
- func (f *Framework) NewTestVaultServerOptions(kubeConfigPath string, controllerOptions *srvr.ExtraOptions) *srvr.VaultServerOptions
- func (f *Framework) StartAPIServerAndOperator(config *restclient.Config, kubeConfigPath string, ...)
- func (f *Framework) UpdateAWSAccessKeyRequestStatus(status *api.AWSAccessKeyRequestStatus, dbAReq *api.AWSAccessKeyRequest) error
- func (f *Framework) UpdateAzureAccessKeyRequestStatus(status *api.AzureAccessKeyRequestStatus, azureAReq *api.AzureAccessKeyRequest) error
- func (f *Framework) UpdateDatabaseAccessRequestStatus(status *api.DatabaseAccessRequestStatus, dbAReq *api.DatabaseAccessRequest) error
- func (f *Framework) UpdateGCPAccessKeyRequestStatus(status *api.GCPAccessKeyRequestStatus, dbAReq *api.GCPAccessKeyRequest) error
- func (f *Framework) UpdateVaultPolicy(obj *api.VaultPolicy) (*api.VaultPolicy, error)
- func (f *Framework) UpdateVaultPolicyBinding(obj *api.VaultPolicyBinding) (*api.VaultPolicyBinding, error)
- func (f *Framework) UpdateVaultServer(obj *api.VaultServer) (*api.VaultServer, error)
- type Invocation
- func (f *Invocation) VaultPolicy(policy string, ref *appcat.AppReference) *api.VaultPolicy
- func (f *Invocation) VaultPolicyBinding(policies, saNames, saNamespaces []string) *api.VaultPolicyBinding
- func (f *Invocation) VaultServer(replicas int32, bs api.BackendStorageSpec) *api.VaultServer
- func (f *Invocation) VaultServerWithUnsealer(replicas int32, bs api.BackendStorageSpec, us api.UnsealerSpec) *api.VaultServer
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" VaultServerName = "test-vault-5434" VaultServerVersion = "1.2.3" VaultKey = "vault-key-6765" )
Variables ¶
View Source
var ( SelfHostedOperator = true DockerRegistry = "kubevault" UnsealerImage = "vault-unsealer:v0.3.0" )
View Source
var ( MongodbServiceName = rand.WithUniqSuffix("test-svc-mongodb") MongodbDeploymentName = rand.WithUniqSuffix("test-mongodb-deploy") )
Functions ¶
func EnsureKubernetesAuth ¶
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 (*Framework) CleanAdmissionConfigs ¶
func (f *Framework) CleanAdmissionConfigs()
func (*Framework) CleanUpVaultServer ¶
func (*Framework) CreateAppBinding ¶
func (f *Framework) CreateAppBinding(a *appcat.AppBinding) error
func (*Framework) CreateDeployment ¶
func (f *Framework) CreateDeployment(obj apps.Deployment) (*apps.Deployment, error)
func (*Framework) CreateLocalRef2AppRef ¶
func (f *Framework) CreateLocalRef2AppRef(namespace string, reference *v1.LocalObjectReference) *appcat.AppReference
func (*Framework) CreateNamespace ¶
func (*Framework) CreateSecretWithData ¶
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 (*Framework) DeleteAppBinding ¶
func (*Framework) DeleteConfigMap ¶
func (f *Framework) DeleteConfigMap(meta metav1.ObjectMeta) error
func (*Framework) DeleteDeployment ¶
func (*Framework) DeleteEtcd ¶
func (*Framework) DeleteMongodb ¶
func (*Framework) DeleteMySQLForVault ¶
func (*Framework) DeleteMysql ¶
func (*Framework) DeleteNamespace ¶
func (*Framework) DeletePostgres ¶
func (*Framework) DeletePostgresSQL ¶
func (*Framework) DeleteSecret ¶
func (*Framework) DeleteService ¶
func (*Framework) DeleteVault ¶
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) DeleteVaultServerObj ¶
func (f *Framework) DeleteVaultServerObj(obj *api.VaultServer) error
func (*Framework) DeleteVaultserverVersion ¶
func (*Framework) DeployEtcd ¶
func (*Framework) DeployMongodb ¶
func (f *Framework) DeployMongodb() (*appcat.AppReference, error)
DeployMongodb will do:
- create service
- create deployment
- create credential secret
func (*Framework) DeployMySQLForVault ¶
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 (*Framework) DeployVault ¶
func (f *Framework) DeployVault() (*appcat.AppReference, error)
DeployVault will do
- create service
- create deployment
- create vault token secret
func (*Framework) DeployVaultServer ¶
func (f *Framework) DeployVaultServer() (*appcat.AppReference, error)
func (*Framework) DynamoDBCreateTable ¶
func (*Framework) DynamoDBDeleteTable ¶
func (*Framework) EventuallyAPIServerReady ¶
func (f *Framework) EventuallyAPIServerReady() GomegaAsyncAssertion
func (*Framework) EventuallyConfigMap ¶
func (*Framework) EventuallyDeployment ¶
func (f *Framework) EventuallyDeployment(meta metav1.ObjectMeta) GomegaAsyncAssertion
func (*Framework) EventuallySecret ¶
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) GetAppBinding ¶
func (f *Framework) GetAppBinding(name, namespace string) (*appcat.AppBinding, error)
func (*Framework) GetNodePortIP ¶
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 (*Framework) Invoke ¶
func (f *Framework) Invoke() *Invocation
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(replicas int32, bs api.BackendStorageSpec) *api.VaultServer
func (*Invocation) VaultServerWithUnsealer ¶
func (f *Invocation) VaultServerWithUnsealer(replicas int32, bs api.BackendStorageSpec, us api.UnsealerSpec) *api.VaultServer
Source Files ¶
- admission.go
- appbinding.go
- awsaccesskeyrequest.go
- azureaccesskeyrequest.go
- configmap.go
- databaseaccessrequest.go
- deployment.go
- dynamodb.go
- etcd.go
- exec.go
- framework.go
- gcpaccesskeyrequest.go
- mongodb.go
- mysql.go
- mysqldb.go
- namespace.go
- pod.go
- policy.go
- policybinding.go
- postgres.go
- postgresql.go
- secret.go
- service.go
- util.go
- vault.go
- vaultserver.go
- vaultserver_version.go
Click to show internal directories.
Click to hide internal directories.