Documentation
¶
Index ¶
- Constants
- func ClusterIsReady(ctx context.Context, adminClient client.Client, clusterName, namespace string)
- func FromYamlToK8sObject(doc string, resources ...any) error
- func IsResourceOwnedByOwner(owner, owned metav1.Object) bool
- func Log(args ...any)
- func LogErr(format string, args ...any)
- func Logf(format string, args ...any)
- func OffBoardRemoteCluster(ctx context.Context, adminClient, remoteClient client.Client, ...)
- func OnboardRemoteCluster(ctx context.Context, k8sClient client.Client, kubeConfigBytes []byte, ...)
- func OnboardRemoteOIDCCluster(ctx context.Context, k8sClient client.Client, caCert []byte, ...)
- func WaitUntilNamespaceCreated(ctx context.Context, k8sClient client.Client, name string) error
- func WaitUntilResourceReadyOrNotReady(ctx context.Context, apiClient client.Client, resource lifecycle.RuntimeObject, ...) error
- type SecretType
- type TestEnv
- func (env *TestEnv) GenerateFluxControllerLogs(ctx context.Context, controllerName string, startTime time.Time)
- func (env *TestEnv) GenerateGreenhouseControllerLogs(ctx context.Context, startTime time.Time)
- func (env *TestEnv) WithGitHubSecret(ctx context.Context, k8sClient client.Client, name string, ...) *TestEnv
- func (env *TestEnv) WithOrganization(ctx context.Context, k8sClient client.Client, samplePath string) *TestEnv
- type WaitApplyFunc
Constants ¶
View Source
const ( AdminKubeConfigPathEnv = "GREENHOUSE_ADMIN_KUBECONFIG" RemoteKubeConfigPathEnv = "GREENHOUSE_REMOTE_KUBECONFIG" ControllerLogsPathEnv = "CONTROLLER_LOGS_PATH" )
View Source
const ManagedResourceName = "greenhouse"
Variables ¶
This section is empty.
Functions ¶
func ClusterIsReady ¶
func FromYamlToK8sObject ¶
FromYamlToK8sObject - Converts a YAML document to a Kubernetes object if yaml contains multiple documents, then corresponding kubernetes objects should be provided
func IsResourceOwnedByOwner ¶
func OffBoardRemoteCluster ¶
func OnboardRemoteCluster ¶
func WaitUntilNamespaceCreated ¶
WaitUntilNamespaceCreated waits until the namespace is created and active TODO: Remove this once organization controller is standardized
func WaitUntilResourceReadyOrNotReady ¶
func WaitUntilResourceReadyOrNotReady(ctx context.Context, apiClient client.Client, resource lifecycle.RuntimeObject, name, namespace string, applyFunc WaitApplyFunc, readyStatus bool) error
Types ¶
type SecretType ¶ added in v0.9.0
type SecretType int
const ( GitHubSecretTypePAT SecretType = iota GitHubSecretTypeAPP GitHubSecretTypeFake )
type TestEnv ¶
type TestEnv struct {
AdminRestClientGetter *clientutil.RestClientGetter
RemoteRestClientGetter *clientutil.RestClientGetter
TestNamespace string
IsRealCluster bool
RemoteKubeConfigBytes []byte
}
func NewExecutionEnv ¶
func NewExecutionEnv() *TestEnv
func (*TestEnv) GenerateFluxControllerLogs ¶ added in v0.9.0
func (*TestEnv) GenerateGreenhouseControllerLogs ¶ added in v0.9.0
func (*TestEnv) WithGitHubSecret ¶ added in v0.9.0
type WaitApplyFunc ¶
type WaitApplyFunc func(resource lifecycle.RuntimeObject) error
Click to show internal directories.
Click to hide internal directories.