replicaset

package
v2.1.1-0...-11cc7cf Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromCells

func FromCells(cells []dataselect.DataCell) []apps.ReplicaSet

func GetReplicaSetPods

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

GetReplicaSetPods return list of pods targeting replica set.

func GetReplicaSetServices

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

GetReplicaSetServices returns list of services that are related to replica set targeted by given name.

func ToCells

func ToCells(std []apps.ReplicaSet) []dataselect.DataCell

Types

type ReplicaSet

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

	// Aggregate information about pods belonging to this Replica Set.
	Pods common.PodInfo `json:"podInfo"`

	// Container images of the Replica Set.
	ContainerImages []string `json:"containerImages"`

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

ReplicaSet is a presentation layer view of Kubernetes Replica Set resource.

func ToReplicaSet

func ToReplicaSet(replicaSet *apps.ReplicaSet, podInfo *common.PodInfo) ReplicaSet

ToReplicaSet converts replica set api object to replica set model object.

type ReplicaSetCell

type ReplicaSetCell apps.ReplicaSet

func (ReplicaSetCell) GetProperty

func (ReplicaSetCell) GetResourceSelector

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

type ReplicaSetDetail

type ReplicaSetDetail struct {
	// Extends list item structure.
	ReplicaSet `json:",inline"`

	// Selector of this replica set.
	Selector *metaV1.LabelSelector `json:"selector"`

	// List of Horizontal Pod Autoscalers targeting this Replica Set.
	HorizontalPodAutoscalerList hpa.HorizontalPodAutoscalerList `json:"horizontalPodAutoscalerList"`

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

ReplicaSetDetail is a presentation layer view of Kubernetes Replica Set resource. This means it is Replica Set plus additional augmented data we can get from other sources (like services that target the same pods).

func GetReplicaSetDetail

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

GetReplicaSetDetail gets replica set details.

type ReplicaSetList

type ReplicaSetList 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 Replica Sets.
	ReplicaSets []ReplicaSet `json:"replicaSets"`

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

ReplicaSetList contains a list of Replica Sets in the cluster.

func GetReplicaSetList

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

GetReplicaSetList returns a list of all Replica Sets in the cluster.

func GetReplicaSetListFromChannels

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

GetReplicaSetListFromChannels returns a list of all Replica Sets in the cluster reading required resource list once from the channels.

func ToReplicaSetList

func ToReplicaSetList(replicaSets []apps.ReplicaSet, pods []v1.Pod, events []v1.Event, nonCriticalErrors []error,
	dsQuery *dataselect.DataSelectQuery, metricClient metricapi.MetricClient) *ReplicaSetList

ToReplicaSetList creates paginated list of Replica Set model objects based on Kubernetes Replica Set objects array and related resources arrays.

Jump to

Keyboard shortcuts

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