helpers

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUserToKubeConfig added in v0.9.0

func AddUserToKubeConfig(userName, userToken string)

func Cf added in v0.10.0

func Cf(args ...string) *gexec.Session

func CreateSelfSignedCertificatePEM added in v0.9.0

func CreateSelfSignedCertificatePEM() []byte

func CreateTrustedCertificatePEM added in v0.9.0

func CreateTrustedCertificatePEM(userName string, validFor time.Duration) []byte

func EventuallyPollingInterval added in v0.10.0

func EventuallyPollingInterval() time.Duration

func EventuallyShouldHold added in v0.8.0

func EventuallyShouldHold(condition func(g Gomega))

func EventuallyTimeout added in v0.9.0

func EventuallyTimeout() time.Duration

func GetDefaultedEnvVar added in v0.9.0

func GetDefaultedEnvVar(envVarName, defaultValue string) string

func GetRequiredEnvVar added in v0.9.0

func GetRequiredEnvVar(envVarName string) string

func Kubectl added in v0.9.0

func Kubectl(args ...string) *Session

func KubectlApply added in v0.9.0

func KubectlApply(stdinText string, sprintfArgs ...any) *Session

func NewActualRestyResponse added in v0.9.0

func NewActualRestyResponse(response *resty.Response) actualRestyResponse

func NewCachedClient added in v0.8.0

func NewCachedClient(cfg *rest.Config) (client.Client, context.CancelFunc)

func NewK8sManager added in v0.8.0

func NewK8sManager(testEnv *envtest.Environment, managerRolePath string) manager.Manager

func NewUncachedClient added in v0.11.0

func NewUncachedClient(cfg *rest.Config) client.Client

func RemoveUserFromKubeConfig added in v0.9.0

func RemoveUserFromKubeConfig(userName string)

func SetupTestEnvUser added in v0.8.0

func SetupTestEnvUser(testEnv *envtest.Environment, roleDefinitionPath string) *rest.Config

func StartK8sManager added in v0.8.0

func StartK8sManager(k8sManager manager.Manager) context.CancelFunc

Types

type CorrelatedRestyClient added in v0.9.0

type CorrelatedRestyClient struct {
	*resty.Client
	// contains filtered or unexported fields
}

func NewCorrelatedRestyClient added in v0.9.0

func NewCorrelatedRestyClient(apiServerRoot string, getCorrelationId func() string) *CorrelatedRestyClient

func (*CorrelatedRestyClient) R added in v0.9.0

func (c *CorrelatedRestyClient) R() *resty.Request

func (*CorrelatedRestyClient) SetAuthScheme added in v0.9.0

func (c *CorrelatedRestyClient) SetAuthScheme(scheme string) *CorrelatedRestyClient

func (*CorrelatedRestyClient) SetAuthToken added in v0.9.0

func (c *CorrelatedRestyClient) SetAuthToken(token string) *CorrelatedRestyClient

func (*CorrelatedRestyClient) SetTLSClientConfig added in v0.9.0

func (c *CorrelatedRestyClient) SetTLSClientConfig(config *tls.Config) *CorrelatedRestyClient

type ServiceAccountFactory added in v0.9.0

type ServiceAccountFactory struct {
	// contains filtered or unexported fields
}

func NewServiceAccountFactory added in v0.9.0

func NewServiceAccountFactory(rootNamespace string) *ServiceAccountFactory

func (*ServiceAccountFactory) CreateAdminServiceAccount added in v0.9.0

func (f *ServiceAccountFactory) CreateAdminServiceAccount(adminServiceAccount string) string

func (*ServiceAccountFactory) CreateServiceAccount added in v0.9.0

func (f *ServiceAccountFactory) CreateServiceAccount(name string) string

func (*ServiceAccountFactory) DeleteServiceAccount added in v0.9.0

func (f *ServiceAccountFactory) DeleteServiceAccount(name string)

func (*ServiceAccountFactory) FullyQualifiedName added in v0.9.0

func (f *ServiceAccountFactory) FullyQualifiedName(svcAcctName string) string

type SyncClient added in v0.8.0

type SyncClient struct {
	client.Client
}

func NewSyncClient added in v0.8.0

func NewSyncClient(k8sClient client.Client) *SyncClient

func (*SyncClient) Create added in v0.8.0

func (c *SyncClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error

func (*SyncClient) Delete added in v0.9.0

func (c *SyncClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error

func (*SyncClient) Patch added in v0.8.0

func (c *SyncClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, _ ...client.PatchOption) error

func (*SyncClient) Status added in v0.8.0

func (c *SyncClient) Status() client.SubResourceWriter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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