kubernetes

package
v0.0.0-...-0a82f0e Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: Apache-2.0 Imports: 20 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.

func NewDaemonSetLister

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

NewDaemonSetLister builds a daemonset lister.

func NewJobLister

func NewJobLister(kubeClient client.Interface, stopchannel <-chan struct{}) v1batchlister.JobLister

NewJobLister builds a job lister.

func NewReplicaSetLister

func NewReplicaSetLister(kubeClient client.Interface, stopchannel <-chan struct{}) v1appslister.ReplicaSetLister

NewReplicaSetLister builds a replicaset lister.

func NewReplicationControllerLister

func NewReplicationControllerLister(kubeClient client.Interface, stopchannel <-chan struct{}) v1lister.ReplicationControllerLister

NewReplicationControllerLister builds a replicationcontroller lister.

func NewStatefulSetLister

func NewStatefulSetLister(kubeClient client.Interface, stopchannel <-chan struct{}) v1appslister.StatefulSetLister

NewStatefulSetLister builds a statefulset lister.

func NewTestDaemonSetLister

func NewTestDaemonSetLister(dss []*appsv1.DaemonSet) (v1appslister.DaemonSetLister, error)

NewTestDaemonSetLister returns a lister that returns provided DaemonSets

func NewTestJobLister

func NewTestJobLister(jobs []*batchv1.Job) (v1batchlister.JobLister, error)

NewTestJobLister returns a lister that returns provided Jobs

func NewTestReplicaSetLister

func NewTestReplicaSetLister(rss []*appsv1.ReplicaSet) (v1appslister.ReplicaSetLister, error)

NewTestReplicaSetLister returns a lister that returns provided ReplicaSets

func NewTestReplicationControllerLister

func NewTestReplicationControllerLister(rcs []*apiv1.ReplicationController) (v1lister.ReplicationControllerLister, error)

NewTestReplicationControllerLister returns a lister that returns provided ReplicationControllers

func NewTestStatefulSetLister

func NewTestStatefulSetLister(sss []*appsv1.StatefulSet) (v1appslister.StatefulSetLister, error)

NewTestStatefulSetLister returns a lister that returns provided StatefulSets

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 ListerRegistry

type ListerRegistry interface {
	AllNodeLister() NodeLister
	ReadyNodeLister() NodeLister
	ScheduledPodLister() PodLister
	UnschedulablePodLister() PodLister
	PodDisruptionBudgetLister() PodDisruptionBudgetLister
	DaemonSetLister() v1appslister.DaemonSetLister
	ReplicationControllerLister() v1lister.ReplicationControllerLister
	JobLister() v1batchlister.JobLister
	ReplicaSetLister() v1appslister.ReplicaSetLister
	StatefulSetLister() v1appslister.StatefulSetLister
}

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

func NewListerRegistry

func NewListerRegistry(allNode NodeLister, readyNode NodeLister, scheduledPod PodLister,
	unschedulablePod PodLister, podDisruptionBudgetLister PodDisruptionBudgetLister,
	daemonSetLister v1appslister.DaemonSetLister, replicationControllerLister v1lister.ReplicationControllerLister,
	jobLister v1batchlister.JobLister, replicaSetLister v1appslister.ReplicaSetLister,
	statefulSetLister v1appslister.StatefulSetLister) 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 NewReadyNodeLister

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

NewReadyNodeLister builds a node lister.

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 NewTestPodLister

func NewTestPodLister(pods []*apiv1.Pod) PodLister

NewTestPodLister returns a lister that returns provided pods

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 TestPodLister

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

TestPodLister is used in tests involving listers

func (TestPodLister) List

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

List returns all pods in test lister.

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