Documentation ¶
Index ¶
- func ComponentImageName(repository, component, version string) string
- func ComponentName(component, name string) string
- func InternetIP() (net.IP, error)
- func KubeConfigFromSecret(client kubernetes.Interface, cluster *clusterv1alpha1.Cluster) (*clientcmdapi.Config, error)
- func TryRunCommand(f func() error, failureThreshold int) error
- type KubeWaiter
- type Waiter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComponentImageName ¶
func ComponentName ¶
func KubeConfigFromSecret ¶
func KubeConfigFromSecret(client kubernetes.Interface, cluster *clusterv1alpha1.Cluster) (*clientcmdapi.Config, error)
func TryRunCommand ¶
TryRunCommand runs a function a maximum of failureThreshold times, and retries on error. If failureThreshold is hit; the last error is returned
Types ¶
type KubeWaiter ¶
type KubeWaiter struct {
// contains filtered or unexported fields
}
KubeWaiter is an implementation of Waiter that is backed by a Kubernetes client
func (*KubeWaiter) SetTimeout ¶
func (w *KubeWaiter) SetTimeout(timeout time.Duration)
SetTimeout adjusts the timeout to the specified duration
func (*KubeWaiter) WaitForKubeAPI ¶
func (w *KubeWaiter) WaitForKubeAPI() error
WaitForKubeAPI waits for the API Server's /healthz endpoint to report "ok"
func (*KubeWaiter) WaitForPodsWithLabel ¶
func (w *KubeWaiter) WaitForPodsWithLabel(namespace, kvLabel string) error
WaitForPodsWithLabel will lookup pods with the given label and wait until they are all reporting status as running.
type Waiter ¶
type Waiter interface { // WaitForKubeAPI waits for the API Server's /healthz endpoint to become "ok" WaitForKubeAPI() error // WaitForPodsWithLabel waits for Pods in a given namespace to become Ready WaitForPodsWithLabel(namespace, kvLabel string) error // // WaitForHealthyKubelet blocks until the kubelet /healthz endpoint returns 'ok' // WaitForHealthyKubelet(initialTimeout time.Duration, healthzEndpoint string) error // // WaitForKubeletAndFunc is a wrapper for WaitForHealthyKubelet that also blocks for a function // WaitForKubeletAndFunc(f func() error) error // SetTimeout adjusts the timeout to the specified duration SetTimeout(timeout time.Duration) }
Waiter is an interface for waiting for criteria in Kubernetes to happen
Click to show internal directories.
Click to hide internal directories.