replicationcontroller

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 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

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:"podInfo"`

	// 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

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

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

type ReplicationControllerCell

type ReplicationControllerCell v1.ReplicationController

func (ReplicationControllerCell) GetProperty

func (ReplicationControllerCell) GetResourceSelector

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

type ReplicationControllerDetail

type ReplicationControllerDetail struct {
	// Extends list item structure.
	ReplicationController `json:",inline"`

	LabelSelector map[string]string `json:"labelSelector"`

	// 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, 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