kubernetes

package
v0.0.0-...-4974f38 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2017 License: Apache-2.0 Imports: 19 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 NewAllNodeLister

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

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

func (*AllNodeLister) List

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

List returns all nodes

type DaemonSetLister

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

DaemonSetLister lists all daemonsets.

func NewDaemonSetLister

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

NewDaemonSetLister builds a daemonset lister.

func (*DaemonSetLister) List

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

List returns all daemon sets

type ListerRegistry

type ListerRegistry interface {
	AllNodeLister() *AllNodeLister
	ReadyNodeLister() *ReadyNodeLister
	ScheduledPodLister() *ScheduledPodLister
	UnschedulablePodLister() *UnschedulablePodLister
	PodDisruptionBudgetLister() *PodDisruptionBudgetLister
	DaemonSetLister() *DaemonSetLister
}

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

func NewListerRegistry

func NewListerRegistry(allNode *AllNodeLister, readyNode *ReadyNodeLister, scheduledPod *ScheduledPodLister,
	unschedulablePod *UnschedulablePodLister, 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.

type PodDisruptionBudgetLister

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

PodDisruptionBudgetLister lists all pod disruption budgets

func NewPodDisruptionBudgetLister

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

NewPodDisruptionBudgetLister builds a pod disruption budget lister.

func (*PodDisruptionBudgetLister) List

List returns all pdbs

type ReadyNodeLister

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

ReadyNodeLister lists ready nodes.

func NewReadyNodeLister

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

NewReadyNodeLister builds a node lister.

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 NewScheduledPodLister

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

NewScheduledPodLister builds ScheduledPodLister

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 NewUnschedulablePodInNamespaceLister

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

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{}) *UnschedulablePodLister

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

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