Documentation ¶
Index ¶
- func CreateFromYAML(ctx context.Context, kc *kubernetes.Clientset, rc *rest.Config, ...) error
- func CreateResources(ctx context.Context, resources []*unstructured.Unstructured, ...) error
- func GetControlPlaneNodesIDs(prefix string) ([]string, error)
- func GetDynamicClient(rc *rest.Config) (*dynamic.DynamicClient, error)
- func GetJoinToken(kc *kubernetes.Clientset, rc *rest.Config, name string, namespace string) (string, error)
- func GetKMCClientSet(ctx context.Context, kc *kubernetes.Clientset, name string, namespace string, ...) (*kubernetes.Clientset, error)
- func GetNodeAddress(ctx context.Context, kc *kubernetes.Clientset, node string) (string, error)
- func InstallK0smotronOperator(ctx context.Context, kc *kubernetes.Clientset, rc *rest.Config) error
- func InstallLocalPathStorage(ctx context.Context, kc *kubernetes.Clientset, rc *rest.Config) error
- func NewSuiteContext(t *testing.T) (context.Context, context.CancelCauseFunc)
- func ParseManifests(data []byte) ([]*unstructured.Unstructured, error)
- func Poll(ctx context.Context, condition wait.ConditionWithContextFunc) error
- func RetryWatchErrors(logf LogfFn) watch.ErrorCallback
- func WaitForDeployment(ctx context.Context, kc *kubernetes.Clientset, name, namespace string) error
- func WaitForNodeReadyStatus(ctx context.Context, clients kubernetes.Interface, nodeName string, ...) error
- func WaitForSecret(ctx context.Context, kc *kubernetes.Clientset, name string, namespace string) error
- func WaitForStatefulSet(ctx context.Context, kc *kubernetes.Clientset, name, namespace string) error
- type ErrorHandler
- type LineWriter
- type LogfFn
- type PortForwarder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFromYAML ¶
func CreateResources ¶
func CreateResources(ctx context.Context, resources []*unstructured.Unstructured, kc *kubernetes.Clientset, client *dynamic.DynamicClient) error
func GetControlPlaneNodesIDs ¶ added in v1.1.0
func GetDynamicClient ¶
func GetDynamicClient(rc *rest.Config) (*dynamic.DynamicClient, error)
func GetJoinToken ¶
func GetKMCClientSet ¶
func GetKMCClientSet(ctx context.Context, kc *kubernetes.Clientset, name string, namespace string, port int) (*kubernetes.Clientset, error)
GetKMCClientSet returns a kubernetes clientset for the cluster given the name and the namespace of the cluster.k0smotron.io
func GetNodeAddress ¶
func InstallLocalPathStorage ¶ added in v0.9.5
func NewSuiteContext ¶ added in v0.4.1
func ParseManifests ¶
func ParseManifests(data []byte) ([]*unstructured.Unstructured, error)
func Poll ¶ added in v1.1.0
func Poll(ctx context.Context, condition wait.ConditionWithContextFunc) error
Poll tries a condition func until it returns true, an error or the specified context is canceled or expired.
func RetryWatchErrors ¶ added in v1.1.0
func RetryWatchErrors(logf LogfFn) watch.ErrorCallback
func WaitForDeployment ¶ added in v1.1.0
WaitForDeployment waits for the Deployment with the given name to become available as long as the given context isn't canceled.
func WaitForNodeReadyStatus ¶ added in v1.1.0
func WaitForNodeReadyStatus(ctx context.Context, clients kubernetes.Interface, nodeName string, status corev1.ConditionStatus) error
func WaitForSecret ¶ added in v0.4.1
func WaitForStatefulSet ¶ added in v1.1.0
func WaitForStatefulSet(ctx context.Context, kc *kubernetes.Clientset, name, namespace string) error
WaitForStatefulSet waits for the StatefulSet with the given name to have as many ready replicas as defined in the spec.
Types ¶
type ErrorHandler ¶
type ErrorHandler func(err error, msgAndArgs ...interface{})
type LineWriter ¶ added in v1.1.0
type LineWriter struct { WriteLine func([]byte) // contains filtered or unexported fields }
func (*LineWriter) Flush ¶ added in v1.1.0
func (s *LineWriter) Flush()
Logs any remaining data in the buffer that doesn't end with a newline.
type PortForwarder ¶
type PortForwarder struct { ReadyChan chan struct{} // contains filtered or unexported fields }
func GetPortForwarder ¶
func (*PortForwarder) LocalPort ¶ added in v0.4.0
func (pf *PortForwarder) LocalPort() (int, error)
Get the local port that is forwarded to the remote port
func (*PortForwarder) Start ¶
func (pf *PortForwarder) Start(errorHandler ErrorHandler)
Start runs ForwardPorts. The errorHandler is expected to be s.Require().NoError