v1.1.0 Latest Latest

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

Go to latest
Published: Jun 22, 2016 License: Apache-2.0 Imports: 10 Imported by: 81




This section is empty.


This section is empty.


func GetDeploymentEvents

func GetDeploymentEvents(dpEvents []api.Event, namespace string,
	deploymentName string) (*common.EventList, error)

GetDeploymentEvents returns model events for a deployment with the given name in the given namespace


type Deployment

type Deployment struct {
	ObjectMeta common.ObjectMeta `json:"objectMeta"`
	TypeMeta   common.TypeMeta   `json:"typeMeta"`

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

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

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

type DeploymentDetail

type DeploymentDetail struct {
	ObjectMeta common.ObjectMeta `json:"objectMeta"`
	TypeMeta   common.TypeMeta   `json:"typeMeta"`

	// Label selector of the service.
	Selector map[string]string `json:"selector"`

	// Status information on the deployment
	StatusInfo `json:"statusInfo"`

	// The deployment strategy to use to replace existing pods with new ones.
	// Valid options: Recreate, RollingUpdate
	Strategy extensions.DeploymentStrategyType `json:"strategy"`

	// Min ready seconds
	MinReadySeconds int32 `json:"minReadySeconds"`

	// Rolling update strategy containing maxSurge and maxUnavailable
	RollingUpdateStrategy *RollingUpdateStrategy `json:"rollingUpdateStrategy,omitempty"`

	// RepliaSetList containing old replica sets from the deployment
	OldReplicaSetList replicaset.ReplicaSetList `json:"oldReplicaSetList"`

	// New replica set used by this deployment
	NewReplicaSet replicaset.ReplicaSet `json:"newReplicaSet"`

	// Optional field that specifies the number of old Replica Sets to retain to allow rollback.
	RevisionHistoryLimit *int32 `json:"revisionHistoryLimit"`

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

DeploymentDetail is a presentation layer view of Kubernetes Deployment resource.

func GetDeploymentDetail

func GetDeploymentDetail(client client.Interface, namespace string,
	name string) (*DeploymentDetail, error)

GetDeploymentDetail returns model object of deployment and error, if any.

type DeploymentList

type DeploymentList struct {
	// Unordered list of Deployments.
	Deployments []Deployment `json:"deployments"`

ReplicationSetList contains a list of Deployments in the cluster.

func GetDeploymentList

func GetDeploymentList(client client.Interface, nsQuery *common.NamespaceQuery) (*DeploymentList, error)

GetDeploymentList returns a list of all Deployments in the cluster.

func GetDeploymentListFromChannels

func GetDeploymentListFromChannels(channels *common.ResourceChannels) (
	*DeploymentList, error)

GetDeploymentList returns a list of all Deployments in the cluster reading required resource list once from the channels.

type RollingUpdateStrategy

type RollingUpdateStrategy struct {
	MaxSurge       int `json:"maxSurge"`
	MaxUnavailable int `json:"maxUnavailable"`

RollingUpdateStrategy is behavior of a rolling update. See RollingUpdateDeployment K8s object.

type StatusInfo

type StatusInfo struct {
	// Total number of desired replicas on the deployment
	Replicas int32 `json:"replicas"`

	// Number of non-terminated pods that have the desired template spec
	Updated int32 `json:"updated"`

	// Number of available pods (ready for at least minReadySeconds)
	// targeted by this deployment
	Available int32 `json:"available"`

	// Total number of unavailable pods targeted by this deployment.
	Unavailable int32 `json:"unavailable"`

func GetStatusInfo

func GetStatusInfo(deploymentStatus *extensions.DeploymentStatus) StatusInfo

Jump to

Keyboard shortcuts

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