replicationcontroller

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetReplicationControllerPods

func GetReplicationControllerPods(client k8sClient.Interface,
	metricClient metricapi.MetricClient,
	dsQuery *dataselect.DataSelectQuery, rcName, namespace string) (*pod.PodList, error)

GetReplicationControllerPods return list of pods targeting replication controller associated to given name.

func GetReplicationControllerServices added in v1.1.1

func GetReplicationControllerServices(client client.Interface, dsQuery *dataselect.DataSelectQuery,
	namespace, rcName string) (*service.ServiceList, error)

GetReplicationControllerServices returns list of services that are related to replication controller targeted by given name.

func UpdateReplicasCount

func UpdateReplicasCount(client k8sClient.Interface, namespace, name string, spec *ReplicationControllerSpec) error

UpdateReplicasCount updates number of replicas in Replication Controller based on Replication Controller Spec

Types

type ReplicationController

type ReplicationController struct {
	ObjectMeta api.ObjectMeta `json:"objectMeta"`
	TypeMeta   api.TypeMeta   `json:"typeMeta"`

	// Aggregate information about pods belonging to this Replication Controller.
	Pods common.PodInfo `json:"pods"`

	// Container images of the Replication Controller.
	ContainerImages []string `json:"containerImages"`

	// Init Container images of the Replication Controller.
	InitContainerImages []string `json:"initContainerImages"`
}

ReplicationController (aka. Replication Controller) plus zero or more Kubernetes services that target the Replication Controller.

func ToReplicationController added in v1.1.1

func ToReplicationController(replicationController *v1.ReplicationController,
	podInfo *common.PodInfo) ReplicationController

ToReplicationController converts replication controller api object to replication controller model object.

type ReplicationControllerCell added in v1.4.0

type ReplicationControllerCell v1.ReplicationController

func (ReplicationControllerCell) GetProperty added in v1.4.0

func (ReplicationControllerCell) GetResourceSelector added in v1.4.0

func (self ReplicationControllerCell) GetResourceSelector() *metricapi.ResourceSelector

type ReplicationControllerDetail

type ReplicationControllerDetail struct {
	ObjectMeta api.ObjectMeta `json:"objectMeta"`
	TypeMeta   api.TypeMeta   `json:"typeMeta"`

	// Label selector of the Replication Controller.
	LabelSelector map[string]string `json:"labelSelector"`

	// Container image list of the pod template specified by this Replication Controller.
	ContainerImages []string `json:"containerImages"`

	// Init Container image list of the pod template specified by this Replication Controller.
	InitContainerImages []string `json:"initContainerImages"`

	// Aggregate information about pods of this replication controller.
	PodInfo common.PodInfo `json:"podInfo"`

	// Detailed information about Pods belonging to this Replication Controller.
	PodList pod.PodList `json:"podList"`

	// Detailed information about service related to Replication Controller.
	ServiceList resourceService.ServiceList `json:"serviceList"`

	// List of events related to this Replication Controller.
	EventList common.EventList `json:"eventList"`

	// True when the data contains at least one pod with metrics information, false otherwise.
	HasMetrics bool `json:"hasMetrics"`

	// List of Horizontal Pod AutoScalers targeting this Replication Controller.
	HorizontalPodAutoscalerList hpa.HorizontalPodAutoscalerList `json:"horizontalPodAutoscalerList"`

	// List of non-critical errors, that occurred during resource retrieval.
	Errors []error `json:"errors"`
}

ReplicationControllerDetail represents detailed information about a Replication Controller.

func GetReplicationControllerDetail

func GetReplicationControllerDetail(client k8sClient.Interface, metricClient metricapi.MetricClient,
	namespace, name string) (*ReplicationControllerDetail, error)

GetReplicationControllerDetail returns detailed information about the given replication controller in the given namespace.

type ReplicationControllerList

type ReplicationControllerList struct {
	ListMeta          api.ListMeta       `json:"listMeta"`
	CumulativeMetrics []metricapi.Metric `json:"cumulativeMetrics"`

	// Basic information about resources status on the list.
	Status common.ResourceStatus `json:"status"`

	// Unordered list of Replication Controllers.
	ReplicationControllers []ReplicationController `json:"replicationControllers"`

	// List of non-critical errors, that occurred during resource retrieval.
	Errors []error `json:"errors"`
}

ReplicationControllerList contains a list of Replication Controllers in the cluster.

func GetReplicationControllerList

func GetReplicationControllerList(client client.Interface, nsQuery *common.NamespaceQuery,
	dsQuery *dataselect.DataSelectQuery, metricClient metricapi.MetricClient) (*ReplicationControllerList, error)

GetReplicationControllerList returns a list of all Replication Controllers in the cluster.

func GetReplicationControllerListFromChannels

func GetReplicationControllerListFromChannels(channels *common.ResourceChannels, dsQuery *dataselect.DataSelectQuery,
	metricClient metricapi.MetricClient) (*ReplicationControllerList, error)

GetReplicationControllerListFromChannels returns a list of all Replication Controllers in the cluster reading required resource list once from the channels.

type ReplicationControllerSpec

type ReplicationControllerSpec struct {
	// Replicas (pods) number in replicas set
	Replicas int32 `json:"replicas"`
}

ReplicationControllerSpec contains information needed to update replication controller.

Jump to

Keyboard shortcuts

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