Documentation ¶
Index ¶
- func GetReplicationControllerEvents(client client.Interface, dsQuery *dataselect.DataSelectQuery, ...) (*common.EventList, error)
- func GetReplicationControllerPods(client k8sClient.Interface, heapsterClient client.HeapsterClient, ...) (*pod.PodList, error)
- func GetReplicationControllerServices(client client.Interface, dsQuery *dataselect.DataSelectQuery, ...) (*service.ServiceList, error)
- func UpdateReplicasCount(client k8sClient.Interface, namespace, name string, ...) error
- type ReplicationController
- type ReplicationControllerCell
- type ReplicationControllerDetail
- type ReplicationControllerList
- func CreateReplicationControllerList(replicationControllers []api.ReplicationController, ...) *ReplicationControllerList
- func GetReplicationControllerList(client *client.Clientset, nsQuery *common.NamespaceQuery, ...) (*ReplicationControllerList, error)
- func GetReplicationControllerListFromChannels(channels *common.ResourceChannels, dsQuery *dataselect.DataSelectQuery, ...) (*ReplicationControllerList, error)
- type ReplicationControllerSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetReplicationControllerEvents ¶
func GetReplicationControllerEvents(client client.Interface, dsQuery *dataselect.DataSelectQuery, namespace, replicationControllerName string) (*common.EventList, error)
GetReplicationControllerEvents returns events for particular namespace and replication controller or error if occurred.
func GetReplicationControllerPods ¶
func GetReplicationControllerPods(client k8sClient.Interface, heapsterClient client.HeapsterClient, 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, replicationControllerSpec *ReplicationControllerSpec) error
UpdateReplicasCount updates number of replicas in Replication Controller based on Replication Controller Spec
Types ¶
type ReplicationController ¶
type ReplicationController struct { ObjectMeta common.ObjectMeta `json:"objectMeta"` TypeMeta common.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"` }
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 *api.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 api.ReplicationController
func (ReplicationControllerCell) GetProperty ¶ added in v1.4.0
func (self ReplicationControllerCell) GetProperty(name dataselect.PropertyName) dataselect.ComparableValue
func (ReplicationControllerCell) GetResourceSelector ¶ added in v1.4.0
func (self ReplicationControllerCell) GetResourceSelector() *metric.ResourceSelector
type ReplicationControllerDetail ¶
type ReplicationControllerDetail struct { ObjectMeta common.ObjectMeta `json:"objectMeta"` TypeMeta common.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"` // 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 horizontalpodautoscaler.HorizontalPodAutoscalerList `json:"horizontalPodAutoscalerList"` }
ReplicationControllerDetail represents detailed information about a Replication Controller.
func GetReplicationControllerDetail ¶
func GetReplicationControllerDetail(client k8sClient.Interface, heapsterClient client.HeapsterClient, namespace, name string) (*ReplicationControllerDetail, error)
GetReplicationControllerDetail returns detailed information about the given replication controller in the given namespace.
func ToReplicationControllerDetail ¶ added in v1.1.1
func ToReplicationControllerDetail(replicationController *api.ReplicationController, podInfo common.PodInfo, podList pod.PodList, eventList common.EventList, serviceList resourceService.ServiceList, hpas horizontalpodautoscaler.HorizontalPodAutoscalerList) ReplicationControllerDetail
ToReplicationControllerDetail converts replication controller api object to replication controller detail model object.
type ReplicationControllerList ¶
type ReplicationControllerList struct { ListMeta common.ListMeta `json:"listMeta"` // Unordered list of Replication Controllers. ReplicationControllers []ReplicationController `json:"replicationControllers"` CumulativeMetrics []metric.Metric `json:"cumulativeMetrics"` }
ReplicationControllerList contains a list of Replication Controllers in the cluster.
func CreateReplicationControllerList ¶ added in v1.1.1
func CreateReplicationControllerList(replicationControllers []api.ReplicationController, dsQuery *dataselect.DataSelectQuery, pods []api.Pod, events []api.Event, heapsterClient *heapster.HeapsterClient) *ReplicationControllerList
CreateReplicationControllerList creates paginated list of Replication Controller model objects based on Kubernetes Replication Controller objects array and related resources arrays.
func GetReplicationControllerList ¶
func GetReplicationControllerList(client *client.Clientset, nsQuery *common.NamespaceQuery, dsQuery *dataselect.DataSelectQuery, heapsterClient *heapster.HeapsterClient) (*ReplicationControllerList, error)
GetReplicationControllerList returns a list of all Replication Controllers in the cluster.
func GetReplicationControllerListFromChannels ¶
func GetReplicationControllerListFromChannels(channels *common.ResourceChannels, dsQuery *dataselect.DataSelectQuery, heapsterClient *heapster.HeapsterClient) (*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.