kubernetes

package
v0.0.0-...-73e42e7 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEventRecorder

func CreateEventRecorder(kubeClient clientset.Interface) kube_record.EventRecorder

CreateEventRecorder creates an event recorder to send custom events to Kubernetes to be recorded for targeted Kubernetes objects

func GetReadinessState

func GetReadinessState(node *apiv1.Node) (isNodeReady bool, lastTransitionTime time.Time, err error)

GetReadinessState gets readiness state for the node

func IsNodeReadyAndSchedulable

func IsNodeReadyAndSchedulable(node *apiv1.Node) bool

IsNodeReadyAndSchedulable returns true if the node is ready and schedulable.

Types

type AllNodeLister

type AllNodeLister struct {
	// contains filtered or unexported fields
}

AllNodeLister lists all nodes

func (*AllNodeLister) List

func (allNodeLister *AllNodeLister) List() ([]*apiv1.Node, error)

List returns all nodes

type DaemonSetLister

type DaemonSetLister interface {
	List() ([]*extensionsv1.DaemonSet, error)
}

DaemonSetLister lists daemonsets.

func NewDaemonSetLister

func NewDaemonSetLister(kubeClient client.Interface, stopchannel <-chan struct{}) DaemonSetLister

NewDaemonSetLister builds a daemonset lister.

type DaemonSetListerImpl

type DaemonSetListerImpl struct {
	// contains filtered or unexported fields
}

DaemonSetListerImpl lists all daemonsets.

func (*DaemonSetListerImpl) List

func (lister *DaemonSetListerImpl) List() ([]*extensionsv1.DaemonSet, error)

List returns all daemon sets

type ListerRegistry

type ListerRegistry interface {
	AllNodeLister() NodeLister
	ReadyNodeLister() NodeLister
	NotReadyNodeLister() NodeLister
	ScheduledPodLister() PodLister
	UnschedulablePodLister() PodLister
	PodDisruptionBudgetLister() PodDisruptionBudgetLister
	DaemonSetLister() DaemonSetLister
}

ListerRegistry is a registry providing various listers to list pods or nodes matching conditions

func NewListerRegistry

func NewListerRegistry(allNode NodeLister, readyNode NodeLister, notReadyNode NodeLister, scheduledPod PodLister,
	unschedulablePod PodLister, podDisruptionBudgetLister PodDisruptionBudgetLister,
	daemonSetLister DaemonSetLister) ListerRegistry

NewListerRegistry returns a registry providing various listers to list pods or nodes matching conditions

func NewListerRegistryWithDefaultListers

func NewListerRegistryWithDefaultListers(kubeClient client.Interface, stopChannel <-chan struct{}) ListerRegistry

NewListerRegistryWithDefaultListers returns a registry filled with listers of the default implementations

type NodeLister

type NodeLister interface {
	List() ([]*apiv1.Node, error)
}

NodeLister lists nodes.

func NewAllNodeLister

func NewAllNodeLister(kubeClient client.Interface, stopchannel <-chan struct{}) NodeLister

NewAllNodeLister builds a node lister that returns all nodes (ready and unready)

func NewNotReadyNodeLister

func NewNotReadyNodeLister(kubeClient client.Interface, stopChannel <-chan struct{}) NodeLister

NewReadyNodeLister builds a node lister.

func NewReadyNodeLister

func NewReadyNodeLister(kubeClient client.Interface, stopChannel <-chan struct{}) NodeLister

NewReadyNodeLister builds a node lister.

type NotReadyNodeLister

type NotReadyNodeLister struct {
	// contains filtered or unexported fields
}

NotReadyNodeLister lists ready nodes.

func (*NotReadyNodeLister) List

func (notReadyNodeLister *NotReadyNodeLister) List() ([]*apiv1.Node, error)

List returns not ready nodes.

type PodDisruptionBudgetLister

type PodDisruptionBudgetLister interface {
	List() ([]*policyv1.PodDisruptionBudget, error)
}

PodDisruptionBudgetLister lists pod disruption budgets.

func NewPodDisruptionBudgetLister

func NewPodDisruptionBudgetLister(kubeClient client.Interface, stopchannel <-chan struct{}) PodDisruptionBudgetLister

NewPodDisruptionBudgetLister builds a pod disruption budget lister.

type PodDisruptionBudgetListerImpl

type PodDisruptionBudgetListerImpl struct {
	// contains filtered or unexported fields
}

PodDisruptionBudgetListerImpl lists pod disruption budgets

func (*PodDisruptionBudgetListerImpl) List

List returns all pdbs

type PodLister

type PodLister interface {
	List() ([]*apiv1.Pod, error)
}

PodLister lists pods.

func NewScheduledPodLister

func NewScheduledPodLister(kubeClient client.Interface, stopchannel <-chan struct{}) PodLister

NewScheduledPodLister builds ScheduledPodLister

func NewUnschedulablePodInNamespaceLister

func NewUnschedulablePodInNamespaceLister(kubeClient client.Interface, namespace string, stopchannel <-chan struct{}) PodLister

NewUnschedulablePodInNamespaceLister returns a lister providing pods that failed to be scheduled in the given namespace.

func NewUnschedulablePodLister

func NewUnschedulablePodLister(kubeClient client.Interface, stopchannel <-chan struct{}) PodLister

NewUnschedulablePodLister returns a lister providing pods that failed to be scheduled.

type ReadyNodeLister

type ReadyNodeLister struct {
	// contains filtered or unexported fields
}

ReadyNodeLister lists ready nodes.

func (*ReadyNodeLister) List

func (readyNodeLister *ReadyNodeLister) List() ([]*apiv1.Node, error)

List returns ready nodes.

type ScheduledPodLister

type ScheduledPodLister struct {
	// contains filtered or unexported fields
}

ScheduledPodLister lists scheduled pods.

func (*ScheduledPodLister) List

func (lister *ScheduledPodLister) List() ([]*apiv1.Pod, error)

List returns all scheduled pods.

type UnschedulablePodLister

type UnschedulablePodLister struct {
	// contains filtered or unexported fields
}

UnschedulablePodLister lists unscheduled pods

func (*UnschedulablePodLister) List

func (unschedulablePodLister *UnschedulablePodLister) List() ([]*apiv1.Pod, error)

List returns all unscheduled pods.

Jump to

Keyboard shortcuts

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