controller

package
v0.0.0-...-ecf1725 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DaemonSetController

type DaemonSetController apps.DaemonSet

DaemonSetController is an alias-type for Kubernetes API Daemon Set type. It allows to provide custom set of functions for already existing type.

func (DaemonSetController) Get

func (self DaemonSetController) Get(allPods []v1.Pod, allEvents []v1.Event) ResourceOwner

Get is an implementation of Get method from ResourceController interface.

func (DaemonSetController) GetLogSources

func (self DaemonSetController) GetLogSources(allPods []v1.Pod) LogSources

GetLogSources is an implementation of the GetLogSources method from ResourceController interface.

func (DaemonSetController) UID

func (self DaemonSetController) UID() types.UID

UID is an implementation of UID method from ResourceController interface.

type JobController

type JobController batch.Job

JobController is an alias-type for Kubernetes API Job type. It allows to provide custom set of functions for already existing type.

func (JobController) Get

func (self JobController) Get(allPods []v1.Pod, allEvents []v1.Event) ResourceOwner

Get is an implementation of Get method from ResourceController interface.

func (JobController) GetLogSources

func (self JobController) GetLogSources(allPods []v1.Pod) LogSources

GetLogSources is an implementation of the GetLogSources method from ResourceController interface.

func (JobController) UID

func (self JobController) UID() types.UID

UID is an implementation of UID method from ResourceController interface.

type LogSources

type LogSources struct {
	ContainerNames     []string `json:"containerNames"`
	InitContainerNames []string `json:"initContainerNames"`
	PodNames           []string `json:"podNames"`
}

LogSources is a structure that represents all log files (all combinations of pods and container) from a higher level controller (such as ReplicaSet).

type PodController

type PodController v1.Pod

func (PodController) Get

func (self PodController) Get(allPods []v1.Pod, allEvents []v1.Event) ResourceOwner

Get is an implementation of Get method from ResourceController interface.

func (PodController) GetLogSources

func (self PodController) GetLogSources(allPods []v1.Pod) LogSources

GetLogSources is an implementation of the GetLogSources method from ResourceController interface.

func (PodController) UID

func (self PodController) UID() types.UID

UID is an implementation of UID method from ResourceController interface.

type ReplicaSetController

type ReplicaSetController apps.ReplicaSet

ReplicaSetController is an alias-type for Kubernetes API Replica Set type. It allows to provide custom set of functions for already existing type.

func (ReplicaSetController) Get

func (self ReplicaSetController) Get(allPods []v1.Pod, allEvents []v1.Event) ResourceOwner

Get is an implementation of Get method from ResourceController interface.

func (ReplicaSetController) GetLogSources

func (self ReplicaSetController) GetLogSources(allPods []v1.Pod) LogSources

GetLogSources is an implementation of the GetLogSources method from ResourceController interface.

func (ReplicaSetController) UID

func (self ReplicaSetController) UID() types.UID

UID is an implementation of UID method from ResourceController interface.

type ReplicationControllerController

type ReplicationControllerController v1.ReplicationController

ReplicationControllerController is an alias-type for Kubernetes API Replication Controller type. It allows to provide custom set of functions for already existing type.

func (ReplicationControllerController) Get

func (self ReplicationControllerController) Get(allPods []v1.Pod,
	allEvents []v1.Event) ResourceOwner

Get is an implementation of Get method from ResourceController interface.

func (ReplicationControllerController) GetLogSources

func (self ReplicationControllerController) GetLogSources(allPods []v1.Pod) LogSources

GetLogSources is an implementation of the GetLogSources method from ResourceController interface.

func (ReplicationControllerController) UID

UID is an implementation of UID method from ResourceController interface.

type ResourceController

type ResourceController interface {
	// UID returns UID of controlled resource.
	UID() types.UID
	// Get is a method, that returns ResourceOwner object.
	Get(allPods []v1.Pod, allEvents []v1.Event) ResourceOwner
	// Returns all log sources of controlled resource (e.g. a list of containers and pods for a replica set).
	GetLogSources(allPods []v1.Pod) LogSources
}

ResourceController is an interface, that allows to perform operations on resource controller. To instantiate it use NewResourceController and pass object reference to it. It may be extended to provide more detailed set of functions.

func NewResourceController

func NewResourceController(ref meta.OwnerReference, namespace string, client client.Interface) (
	ResourceController, error)

NewResourceController creates instance of ResourceController based on given reference. It allows to convert owner/created by references to real objects.

type ResourceOwner

type ResourceOwner struct {
	ObjectMeta          api.ObjectMeta `json:"objectMeta"`
	TypeMeta            api.TypeMeta   `json:"typeMeta"`
	Pods                common.PodInfo `json:"pods"`
	ContainerImages     []string       `json:"containerImages"`
	InitContainerImages []string       `json:"initContainerImages"`
}

ResourceOwner is an structure representing resource owner, it may be Replication Controller, Daemon Set, Job etc.

type StatefulSetController

type StatefulSetController apps.StatefulSet

StatefulSetController is an alias-type for Kubernetes API Stateful Set type. It allows to provide custom set of functions for already existing type.

func (StatefulSetController) Get

func (self StatefulSetController) Get(allPods []v1.Pod, allEvents []v1.Event) ResourceOwner

Get is an implementation of Get method from ResourceController interface.

func (StatefulSetController) GetLogSources

func (self StatefulSetController) GetLogSources(allPods []v1.Pod) LogSources

GetLogSources is an implementation of the GetLogSources method from ResourceController interface.

func (StatefulSetController) UID

func (self StatefulSetController) UID() types.UID

UID is an implementation of UID method from ResourceController interface.

Jump to

Keyboard shortcuts

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