Documentation ¶
Index ¶
- func ApplyFromYAML(ctx context.Context, kc *kubernetes.Clientset, rc *rest.Config, ...) error
- func CreateFromYAML(ctx context.Context, kc *kubernetes.Clientset, rc *rest.Config, ...) error
- func CreateResources(ctx context.Context, resources []*unstructured.Unstructured, ...) error
- func GetCluster(ctx context.Context, kc *kubernetes.Clientset, name string, namespace string) (*clusterv1.Cluster, 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 GetK0sControlPlane(ctx context.Context, kc *kubernetes.Clientset, name string, namespace string) (*cpv1beta1.K0sControlPlane, 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 InstallStableK0smotronOperator(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 UpdateCluster(ctx context.Context, kc *kubernetes.Clientset, cluster *clusterv1.Cluster) error
- func WaitForDeployment(ctx context.Context, kc *kubernetes.Clientset, name, namespace string) error
- func WaitForNodeReadyStatus(ctx context.Context, clients kubernetes.Interface, nodeName string, ...) error
- func WaitForRolloutCompleted(ctx context.Context, kc *kubernetes.Clientset, name string, namespace 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 ApplyFromYAML ¶ added in v1.3.0
func CreateFromYAML ¶
func CreateResources ¶
func CreateResources(ctx context.Context, resources []*unstructured.Unstructured, kc *kubernetes.Clientset, client *dynamic.DynamicClient) error
func GetCluster ¶ added in v1.2.0
func GetControlPlaneNodesIDs ¶ added in v1.1.0
func GetDynamicClient ¶
func GetDynamicClient(rc *rest.Config) (*dynamic.DynamicClient, error)
func GetJoinToken ¶
func GetK0sControlPlane ¶ added in v1.2.0
func GetK0sControlPlane(ctx context.Context, kc *kubernetes.Clientset, name string, namespace string) (*cpv1beta1.K0sControlPlane, error)
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 InstallStableK0smotronOperator ¶ added in v1.3.0
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 UpdateCluster ¶ added in v1.2.0
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 WaitForRolloutCompleted ¶ added in v1.3.0
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