nodeutil

package
v0.0.0-...-8fd29ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientsetFromEnv

func ClientsetFromEnv(kubeConfigPath string) (*kubernetes.Clientset, error)

ClientsetFromEnv returns a kuberentes client set from: 1. the passed in kubeconfig path 2. If the kubeconfig path is empty or non-existent, then the in-cluster config is used.

func FilterPodsForNodeName

func FilterPodsForNodeName(name string) node.PodEventFilterFunc

FilterPodsForNodeName creates an event filter function that filters pod events such that pod.Sepc.NodeName matches the provided name Use the return value of this as the PodEventFilterFunc in PodControllerConfig

func NodeLeaseV1Client

func NodeLeaseV1Client(client kubernetes.Interface) coordclientset.LeaseInterface

NodeLeaseV1Client creates a V1 Lease client for use with node leases from the passed in client.

Use this with node.WithNodeEnableLeaseV1Beta1 when creating a node controller.

func PodFilters

func PodFilters(filters ...node.PodEventFilterFunc) node.PodEventFilterFunc

PodFilters turns a list of pod filters into a single filter. When run, each item in the list is itterated in order until the first `true` result. If nothing returns true, the filter is false.

func PodInformerFilter

func PodInformerFilter(node string) kubeinformers.SharedInformerOption

PodInformerFilter is a filter that you should use when creating a pod informer for use with the pod controller.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL