Documentation ¶
Index ¶
- Constants
- func ActiveDeployment(config *deployapi.DeploymentConfig, input []api.ReplicationController) *api.ReplicationController
- func AnyDeployerPodSelector() labels.Selector
- func CanTransitionPhase(current, next deployapi.DeploymentStatus) bool
- func ConfigSelector(name string) labels.Selector
- func DecodeDeploymentConfig(controller *api.ReplicationController, decoder runtime.Decoder) (*deployapi.DeploymentConfig, error)
- func DeployerPodNameFor(obj runtime.Object) string
- func DeployerPodNameForDeployment(deployment string) string
- func DeployerPodSelector(name string) labels.Selector
- func DeploymentConfigDeepCopy(dc *deployapi.DeploymentConfig) (*deployapi.DeploymentConfig, error)
- func DeploymentConfigNameFor(obj runtime.Object) string
- func DeploymentDeepCopy(rc *api.ReplicationController) (*api.ReplicationController, error)
- func DeploymentDesiredReplicas(obj runtime.Object) (int32, bool)
- func DeploymentNameFor(obj runtime.Object) string
- func DeploymentNameForConfigVersion(name string, version int64) string
- func DeploymentReplicas(obj runtime.Object) (int32, bool)
- func DeploymentStatusFor(obj runtime.Object) deployapi.DeploymentStatus
- func DeploymentStatusReasonFor(obj runtime.Object) string
- func DeploymentVersionFor(obj runtime.Object) int64
- func DeploymentsForCleanup(configuration *deployapi.DeploymentConfig, ...) []api.ReplicationController
- func EncodeDeploymentConfig(config *deployapi.DeploymentConfig, codec runtime.Codec) (string, error)
- func EncodedDeploymentConfigFor(obj runtime.Object) string
- func GetAvailablePods(pods []api.Pod, minReadySeconds int32) int32
- func GetReplicaCountForDeployments(deployments []api.ReplicationController) int32
- func GetStatusReplicaCountForDeployments(deployments []api.ReplicationController) int32
- func HasChangeTrigger(config *deployapi.DeploymentConfig) bool
- func HasSynced(dc *deployapi.DeploymentConfig) bool
- func IsDeploymentCancelled(deployment *api.ReplicationController) bool
- func IsFailedDeployment(deployment *api.ReplicationController) bool
- func IsOwnedByConfig(deployment *api.ReplicationController) bool
- func IsTerminatedDeployment(deployment *api.ReplicationController) bool
- func LabelForDeployment(deployment *api.ReplicationController) string
- func LabelForDeploymentConfig(config *deployapi.DeploymentConfig) string
- func LatestDeploymentInfo(config *deployapi.DeploymentConfig, deployments []api.ReplicationController) (bool, *api.ReplicationController)
- func LatestDeploymentNameForConfig(config *deployapi.DeploymentConfig) string
- func MakeDeployment(config *deployapi.DeploymentConfig, codec runtime.Codec) (*api.ReplicationController, error)
- func WaitForRunningDeployerPod(podClient kclient.PodsNamespacer, rc *api.ReplicationController, ...) error
- type ByLatestVersionAsc
- type ByLatestVersionDesc
- type ByMostRecent
Constants ¶
const DeployerPodSuffix = "deploy"
DeployerPodSuffix is the suffix added to pods created from a deployment
Variables ¶
This section is empty.
Functions ¶
func ActiveDeployment ¶ added in v1.1.1
func ActiveDeployment(config *deployapi.DeploymentConfig, input []api.ReplicationController) *api.ReplicationController
ActiveDeployment returns the latest complete deployment, or nil if there is no such deployment. The active deployment is not always the same as the latest deployment.
func AnyDeployerPodSelector ¶ added in v0.6.2
AnyDeployerPodSelector returns a label Selector which can be used to find all deployer pods across all deployments, including hook and custom deployer pods.
func CanTransitionPhase ¶ added in v1.2.0
func CanTransitionPhase(current, next deployapi.DeploymentStatus) bool
CanTransitionPhase returns whether it is allowed to go from the current to the next phase.
func ConfigSelector ¶ added in v0.5.4
ConfigSelector returns a label Selector which can be used to find all deployments for a DeploymentConfig.
TODO: Using the annotation constant for now since the value is correct but we could consider adding a new constant to the public types.
func DecodeDeploymentConfig ¶ added in v0.2.1
func DecodeDeploymentConfig(controller *api.ReplicationController, decoder runtime.Decoder) (*deployapi.DeploymentConfig, error)
DecodeDeploymentConfig decodes a DeploymentConfig from controller using codec. An error is returned if the controller doesn't contain an encoded config.
func DeployerPodNameFor ¶ added in v0.5.2
func DeployerPodNameForDeployment ¶ added in v0.3.2
DeployerPodNameForDeployment returns the name of a pod for a given deployment
func DeployerPodSelector ¶ added in v0.6.2
DeployerPodSelector returns a label Selector which can be used to find all deployer pods associated with a deployment with name.
func DeploymentConfigDeepCopy ¶ added in v1.3.0
func DeploymentConfigDeepCopy(dc *deployapi.DeploymentConfig) (*deployapi.DeploymentConfig, error)
func DeploymentConfigNameFor ¶ added in v0.5.2
func DeploymentDeepCopy ¶ added in v1.3.0
func DeploymentDeepCopy(rc *api.ReplicationController) (*api.ReplicationController, error)
func DeploymentDesiredReplicas ¶ added in v0.5.3
func DeploymentNameFor ¶ added in v0.5.2
func DeploymentNameForConfigVersion ¶ added in v1.0.7
DeploymentNameForConfigVersion returns the name of the version-th deployment for the config that has the provided name
func DeploymentStatusFor ¶ added in v0.5.2
func DeploymentStatusFor(obj runtime.Object) deployapi.DeploymentStatus
func DeploymentStatusReasonFor ¶ added in v0.5.3
func DeploymentVersionFor ¶ added in v0.5.2
func DeploymentsForCleanup ¶ added in v1.3.0
func DeploymentsForCleanup(configuration *deployapi.DeploymentConfig, deployments []api.ReplicationController) []api.ReplicationController
DeploymentsForCleanup determines which deployments for a configuration are relevant for the revision history limit quota
func EncodeDeploymentConfig ¶ added in v0.2.1
func EncodeDeploymentConfig(config *deployapi.DeploymentConfig, codec runtime.Codec) (string, error)
EncodeDeploymentConfig encodes config as a string using codec.
func EncodedDeploymentConfigFor ¶ added in v0.5.2
func GetAvailablePods ¶ added in v1.3.0
GetAvailablePods returns all the available pods from the provided pod list.
func GetReplicaCountForDeployments ¶ added in v1.3.0
func GetReplicaCountForDeployments(deployments []api.ReplicationController) int32
GetReplicaCountForDeployments returns the sum of all replicas for the given deployments.
func GetStatusReplicaCountForDeployments ¶ added in v1.3.0
func GetStatusReplicaCountForDeployments(deployments []api.ReplicationController) int32
GetStatusReplicaCountForDeployments returns the sum of the replicas reported in the status of the given deployments.
func HasChangeTrigger ¶ added in v1.0.7
func HasChangeTrigger(config *deployapi.DeploymentConfig) bool
HasChangeTrigger returns whether the provided deployment configuration has a config change trigger or not
func HasSynced ¶ added in v1.3.0
func HasSynced(dc *deployapi.DeploymentConfig) bool
func IsDeploymentCancelled ¶ added in v0.5.3
func IsDeploymentCancelled(deployment *api.ReplicationController) bool
func IsFailedDeployment ¶ added in v1.3.0
func IsFailedDeployment(deployment *api.ReplicationController) bool
IsFailedDeployment returns true if the passed deployment failed.
func IsOwnedByConfig ¶ added in v1.3.0
func IsOwnedByConfig(deployment *api.ReplicationController) bool
IsOwnedByConfig checks whether the provided replication controller is part of a deployment configuration. TODO: Switch to use owner references once we got those working.
func IsTerminatedDeployment ¶ added in v1.0.7
func IsTerminatedDeployment(deployment *api.ReplicationController) bool
IsTerminatedDeployment returns true if the passed deployment has terminated (either complete or failed).
func LabelForDeployment ¶ added in v0.5.1
func LabelForDeployment(deployment *api.ReplicationController) string
LabelForDeployment builds a string identifier for a Deployment.
func LabelForDeploymentConfig ¶ added in v0.5.1
func LabelForDeploymentConfig(config *deployapi.DeploymentConfig) string
LabelForDeploymentConfig builds a string identifier for a DeploymentConfig.
func LatestDeploymentInfo ¶ added in v1.0.7
func LatestDeploymentInfo(config *deployapi.DeploymentConfig, deployments []api.ReplicationController) (bool, *api.ReplicationController)
LatestDeploymentInfo returns info about the latest deployment for a config, or nil if there is no latest deployment. The latest deployment is not always the same as the active deployment.
func LatestDeploymentNameForConfig ¶ added in v0.2.1
func LatestDeploymentNameForConfig(config *deployapi.DeploymentConfig) string
LatestDeploymentNameForConfig returns a stable identifier for config based on its version.
func MakeDeployment ¶ added in v0.2.1
func MakeDeployment(config *deployapi.DeploymentConfig, codec runtime.Codec) (*api.ReplicationController, error)
MakeDeployment creates a deployment represented as a ReplicationController and based on the given DeploymentConfig. The controller replica count will be zero.
func WaitForRunningDeployerPod ¶ added in v1.3.0
func WaitForRunningDeployerPod(podClient kclient.PodsNamespacer, rc *api.ReplicationController, timeout time.Duration) error
WaitForRunningDeployerPod waits a given period of time until the deployer pod for given replication controller is not running.
Types ¶
type ByLatestVersionAsc ¶ added in v1.0.7
type ByLatestVersionAsc []api.ReplicationController
ByLatestVersionAsc sorts deployments by LatestVersion ascending.
func (ByLatestVersionAsc) Len ¶ added in v1.0.7
func (d ByLatestVersionAsc) Len() int
func (ByLatestVersionAsc) Less ¶ added in v1.0.7
func (d ByLatestVersionAsc) Less(i, j int) bool
func (ByLatestVersionAsc) Swap ¶ added in v1.0.7
func (d ByLatestVersionAsc) Swap(i, j int)
type ByLatestVersionDesc ¶ added in v1.0.7
type ByLatestVersionDesc []api.ReplicationController
ByLatestVersionDesc sorts deployments by LatestVersion descending.
func (ByLatestVersionDesc) Len ¶ added in v1.0.7
func (d ByLatestVersionDesc) Len() int
func (ByLatestVersionDesc) Less ¶ added in v1.0.7
func (d ByLatestVersionDesc) Less(i, j int) bool
func (ByLatestVersionDesc) Swap ¶ added in v1.0.7
func (d ByLatestVersionDesc) Swap(i, j int)
type ByMostRecent ¶ added in v1.1.1
type ByMostRecent []*api.ReplicationController
ByMostRecent sorts deployments by most recently created.
func (ByMostRecent) Len ¶ added in v1.1.1
func (s ByMostRecent) Len() int
func (ByMostRecent) Less ¶ added in v1.1.1
func (s ByMostRecent) Less(i, j int) bool
func (ByMostRecent) Swap ¶ added in v1.1.1
func (s ByMostRecent) Swap(i, j int)