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 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 TestEnv ¶
type TestEnv struct {
AdminRestClientGetter *clientutil.RestClientGetter
RemoteRestClientGetter *clientutil.RestClientGetter
TestNamespace string
IsRealCluster bool
RemoteKubeConfigBytes []byte
}
func NewExecutionEnv ¶
func NewExecutionEnv() *TestEnv
func (*TestEnv) GenerateControllerLogs ¶
type WaitApplyFunc ¶
type WaitApplyFunc func(resource lifecycle.RuntimeObject) error
Click to show internal directories.
Click to hide internal directories.