Documentation ¶
Index ¶
- Constants
- func DrainNode(ctx context.Context, clientset kubernetes.Interface, node *corev1.Node) error
- func NewClient() (client.WithWatch, *rest.Config, error)
- func NewListerWatcher(ctx context.Context, kubeClient client.WithWatch, objectList client.ObjectList, ...) cache.ListerWatcher
- func NewScheme() (*runtime.Scheme, error)
- func NewWatcher(ctx context.Context, kubeClient client.WithWatch, objectList client.ObjectList, ...) cache.Watcher
- func ParseWatchEventObject[T runtime.Object](event watch.Event) (T, error)
- func PortForward(ctx context.Context, restConfig *rest.Config, podNamespace, podName string, ...) (uint16, func() error, error)
- func SelectorMatchesLabels(labelSelector *metav1.LabelSelector, resourceLabels map[string]string) (bool, error)
- func WaitForAnyReadyPod(ctx context.Context, kubeClient client.WithWatch, opts ...client.ListOption) (*corev1.Pod, error)
- func WaitForNodeToBeDeleted(ctx context.Context, clientset kubernetes.Interface, nodeName string) error
- func WaitUntilDeploymentAvailable(ctx context.Context, kubeClient client.WithWatch, ...) error
- func WaitUntilDeploymentUnavailable(ctx context.Context, kubeClient client.WithWatch, ...) error
Constants ¶
View Source
const ( // https://github.com/kubernetes/autoscaler/blob/5bf33b23f2bcf5f9c8ccaf99d445e25366ee7f40/cluster-autoscaler/utils/taints/taints.go#L39-L42 ToBeDeletedTaint = "ToBeDeletedByClusterAutoscaler" DeletionCandidateTaint = "DeletionCandidateOfClusterAutoscaler" )
Variables ¶
This section is empty.
Functions ¶
func DrainNode ¶
DrainNode uses the default drain implementation to drain the Node: https://github.com/kubernetes/kubectl/blob/3ec401449e5821ad954942c7ecec9d2c90ecaaa1/pkg/drain/default.go
func NewListerWatcher ¶ added in v0.2.0
func NewListerWatcher(ctx context.Context, kubeClient client.WithWatch, objectList client.ObjectList, opts ...client.ListOption) cache.ListerWatcher
func NewScheme ¶
NewScheme creates a new scheme: https://book.kubebuilder.io/cronjob-tutorial/gvks.html#err-but-whats-that-scheme-thing
func NewWatcher ¶ added in v0.2.0
func NewWatcher(ctx context.Context, kubeClient client.WithWatch, objectList client.ObjectList, opts ...client.ListOption) cache.Watcher
func ParseWatchEventObject ¶ added in v0.2.0
ParseWatchEventObject determines if the specified watch event is an error and if so returns an error and otherwise asserts and returns an object of the expected type
func PortForward ¶ added in v0.4.0
func PortForward(ctx context.Context, restConfig *rest.Config, podNamespace, podName string, port int) (uint16, func() error, error)
PortForward port forwards to the specified Pod. The forwarded port is a random available local port which is returned as well as a function to stop the port forward when finished
func SelectorMatchesLabels ¶ added in v0.2.0
func WaitForAnyReadyPod ¶ added in v0.4.0
func WaitForNodeToBeDeleted ¶
func WaitUntilDeploymentAvailable ¶ added in v0.2.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.