expapi

package
v0.18.2-0...-85ee11a Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HorizontalPodAutoscaler

type HorizontalPodAutoscaler struct {
	api.TypeMeta   `json:",inline"`
	api.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behaviour of autoscaler.
	Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty"`

	// Status represents the current information about the autoscaler.
	Status HorizontalPodAutoscalerStatus `json:"status,omitempty"`
}

HorizontalPodAutoscaler represents the configuration of a horizontal pod autoscaler.

func (*HorizontalPodAutoscaler) IsAnAPIObject

func (*HorizontalPodAutoscaler) IsAnAPIObject()

type HorizontalPodAutoscalerList

type HorizontalPodAutoscalerList struct {
	api.TypeMeta `json:",inline"`
	api.ListMeta `json:"metadata,omitempty"`

	Items []HorizontalPodAutoscaler `json:"items"`
}

HorizontalPodAutoscaler is a collection of pod autoscalers.

func (*HorizontalPodAutoscalerList) IsAnAPIObject

func (*HorizontalPodAutoscalerList) IsAnAPIObject()

type HorizontalPodAutoscalerSpec

type HorizontalPodAutoscalerSpec struct {
	// ScaleRef is a reference to Scale subresource. HorizontalPodAutoscaler will learn the current resource consumption from its status,
	// and will set the desired number of pods by modyfying its spec.
	ScaleRef *SubresourceReference `json:"scaleRef"`
	// MinCount is the lower limit for the number of pods that can be set by the autoscaler.
	MinCount int `json:"minCount"`
	// MaxCount is the upper limit for the number of pods that can be set by the autoscaler. It cannot be smaller than MinCount.
	MaxCount int `json:"maxCount"`
	// Target is the target average consumption of the given resource that the autoscaler will try to maintain by adjusting the desired number of pods.
	// Currently two types of resources are supported: "cpu" and "memory".
	Target ResourceConsumption `json:"target"`
}

HorizontalPodAutoscalerSpec is the specification of a horizontal pod autoscaler.

type HorizontalPodAutoscalerStatus

type HorizontalPodAutoscalerStatus struct {
	// CurrentReplicas is the number of replicas of pods managed by this autoscaler.
	CurrentReplicas int `json:"replicas"`

	// DesiredReplicas is the desired number of replicas of pods managed by this autoscaler.
	// The number may be different because pod downscaling is someteimes delayed to keep the number
	// of pods stable.
	DesiredReplicas int `json:"replicas"`

	// CurrentConsumption is the current average consumption of the given resource that the autoscaler will
	// try to maintain by adjusting the desired number of pods.
	// Two types of resources are supported: "cpu" and "memory".
	CurrentConsumption ResourceConsumption `json:"currentConsumption"`

	// LastScaleTimestamp is the last time the HorizontalPodAutoscaler scaled the number of pods.
	// This is used by the autoscaler to controll how often the number of pods is changed.
	LastScaleTimestamp *util.Time `json:"lastScaleTimestamp,omitempty"`
}

HorizontalPodAutoscalerStatus contains the current status of a horizontal pod autoscaler

type ReplicationControllerDummy

type ReplicationControllerDummy struct {
	api.TypeMeta `json:",inline"`
}

Dummy definition

func (*ReplicationControllerDummy) IsAnAPIObject

func (*ReplicationControllerDummy) IsAnAPIObject()

type ResourceConsumption

type ResourceConsumption struct {
	Resource api.ResourceName  `json:"resource,omitempty"`
	Quantity resource.Quantity `json:"quantity,omitempty"`
}

ResourceConsumption is an object for specifying average resource consumption of a particular resource.

type Scale

type Scale struct {
	api.TypeMeta   `json:",inline"`
	api.ObjectMeta `` /* 136-byte string literal not displayed */

	// Spec defines the behavior of the scale.
	Spec ScaleSpec `` /* 161-byte string literal not displayed */

	// Status represents the current status of the scale.
	Status ScaleStatus `` /* 193-byte string literal not displayed */
}

Scale subresource, applicable to ReplicationControllers and (in future) Deployment.

func (*Scale) IsAnAPIObject

func (*Scale) IsAnAPIObject()

type ScaleSpec

type ScaleSpec struct {
	// Replicas is the number of desired replicas.
	Replicas int `` /* 171-byte string literal not displayed */
}

ScaleSpec describes the attributes a Scale subresource

type ScaleStatus

type ScaleStatus struct {
	// Replicas is the number of actual replicas.
	Replicas int `` /* 178-byte string literal not displayed */

	// Selector is a label query over pods that should match the replicas count.
	Selector map[string]string `` /* 255-byte string literal not displayed */
}

ScaleStatus represents the current status of a Scale subresource.

type SubresourceReference

type SubresourceReference struct {
	Kind        string `json:"kind,omitempty"`
	Namespace   string `json:"namespace,omitempty"`
	Name        string `json:"name,omitempty"`
	APIVersion  string `json:"apiVersion,omitempty"`
	Subresource string `json:"subresource,omitempty"`
}

SubresourceReference contains enough information to let you inspect or modify the referred subresource.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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