Documentation ¶
Index ¶
- Variables
- func CanTransitionPhase(current, next appsapi.DeploymentStatus) bool
- func ConfigSelector(name string) labels.Selector
- func DecodeDeploymentConfig(controller metav1.ObjectMetaAccessor) (*appsapi.DeploymentConfig, error)
- func DeployerPodNameForDeployment(deployment string) string
- func DeploymentNameForConfigVersion(name string, version int64) string
- func DeploymentStatusFor(obj runtime.Object) appsapi.DeploymentStatus
- func DeploymentsForCleanup(configuration *appsapi.DeploymentConfig, ...) []v1.ReplicationController
- func GetDeploymentCondition(status appsapi.DeploymentConfigStatus, ...) *appsapi.DeploymentCondition
- func GetTimeoutSecondsForStrategy(config *appsapi.DeploymentConfig) int64
- func HasChangeTrigger(config *appsapi.DeploymentConfig) bool
- func HasImageChangeTrigger(config *appsapi.DeploymentConfig) bool
- func HasLastTriggeredImage(config *appsapi.DeploymentConfig) bool
- func HasLatestPodTemplate(currentConfig *appsapi.DeploymentConfig, rc *v1.ReplicationController) (bool, string, error)
- func HasSynced(dc *appsapi.DeploymentConfig, generation int64) bool
- func HasTrigger(config *appsapi.DeploymentConfig) bool
- func HasUpdatedImages(dc *appsapi.DeploymentConfig, rc *v1.ReplicationController) (bool, []string)
- func IsCompleteDeployment(deployment runtime.Object) bool
- func IsDeploymentCancelled(deployment runtime.Object) bool
- func IsFailedDeployment(deployment runtime.Object) bool
- func IsInitialDeployment(config *appsapi.DeploymentConfig) bool
- func IsOwnedByConfig(obj metav1.Object) bool
- func IsProgressing(config *appsapi.DeploymentConfig, newStatus *appsapi.DeploymentConfigStatus) bool
- func IsTerminatedDeployment(deployment runtime.Object) bool
- func LabelForDeployment(deployment *v1.ReplicationController) string
- func LabelForDeploymentConfig(config *appsapi.DeploymentConfig) string
- func LatestDeploymentInfo(config *appsapi.DeploymentConfig, deployments []*v1.ReplicationController) (bool, *v1.ReplicationController)
- func LatestDeploymentNameForConfig(config *appsapi.DeploymentConfig) string
- func MakeDeploymentV1FromInternalConfig(config *appsapi.DeploymentConfig) (*v1.ReplicationController, error)
- func MakeTestOnlyInternalDeployment(config *appsapi.DeploymentConfig) (*api.ReplicationController, error)
- func MaxSurge(config appsapi.DeploymentConfig) int32
- func MaxUnavailable(config *appsapi.DeploymentConfig) int32
- func NewDeploymentCondition(condType appsapi.DeploymentConditionType, status api.ConditionStatus, ...) *appsapi.DeploymentCondition
- func RecordConfigChangeCause(config *appsapi.DeploymentConfig)
- func RecordImageChangeCauses(config *appsapi.DeploymentConfig, imageNames []string)
- func RemoveDeploymentCondition(status *appsapi.DeploymentConfigStatus, ...)
- func RolloutExceededTimeoutSeconds(config *appsapi.DeploymentConfig, latestRC *v1.ReplicationController) bool
- func SetDeploymentCondition(status *appsapi.DeploymentConfigStatus, condition appsapi.DeploymentCondition)
Constants ¶
This section is empty.
Variables ¶
var ( // deploymentConfigControllerRefKind contains the schema.GroupVersionKind for the // deployment config. This is used in the ownerRef and GC client picks the appropriate // client to get the deployment config. DeploymentConfigControllerRefKind = appsapiv1.SchemeGroupVersion.WithKind("DeploymentConfig") )
Functions ¶
func CanTransitionPhase ¶
func CanTransitionPhase(current, next appsapi.DeploymentStatus) bool
CanTransitionPhase returns whether it is allowed to go from the current to the next phase.
func ConfigSelector ¶
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 ¶
func DecodeDeploymentConfig(controller metav1.ObjectMetaAccessor) (*appsapi.DeploymentConfig, error)
DecodeDeploymentConfig decodes a DeploymentConfig from controller using codec. An error is returned if the controller doesn't contain an encoded config. DEPRECATED: Switch to external decoding
func DeployerPodNameForDeployment ¶
DeployerPodNameForDeployment returns the name of a pod for a given deployment
func DeploymentNameForConfigVersion ¶
DeploymentNameForConfigVersion returns the name of the version-th deployment for the config that has the provided name
func DeploymentStatusFor ¶
func DeploymentStatusFor(obj runtime.Object) appsapi.DeploymentStatus
func DeploymentsForCleanup ¶
func DeploymentsForCleanup(configuration *appsapi.DeploymentConfig, deployments []*v1.ReplicationController) []v1.ReplicationController
DeploymentsForCleanup determines which deployments for a configuration are relevant for the revision history limit quota
func GetDeploymentCondition ¶
func GetDeploymentCondition(status appsapi.DeploymentConfigStatus, condType appsapi.DeploymentConditionType) *appsapi.DeploymentCondition
GetDeploymentCondition returns the condition with the provided type.
func GetTimeoutSecondsForStrategy ¶
func GetTimeoutSecondsForStrategy(config *appsapi.DeploymentConfig) int64
GetTimeoutSecondsForStrategy returns the timeout in seconds defined in the deployment config strategy.
func HasChangeTrigger ¶
func HasChangeTrigger(config *appsapi.DeploymentConfig) bool
HasChangeTrigger returns whether the provided deployment configuration has a config change trigger or not
func HasImageChangeTrigger ¶
func HasImageChangeTrigger(config *appsapi.DeploymentConfig) bool
HasImageChangeTrigger returns whether the provided deployment configuration has an image change trigger or not.
func HasLastTriggeredImage ¶
func HasLastTriggeredImage(config *appsapi.DeploymentConfig) bool
HasLastTriggeredImage returns whether all image change triggers in provided deployment configuration has the lastTriggerImage field set (iow. all images were updated for them). Returns false if deployment configuration has no image change trigger defined.
func HasLatestPodTemplate ¶
func HasLatestPodTemplate(currentConfig *appsapi.DeploymentConfig, rc *v1.ReplicationController) (bool, string, error)
HasLatestPodTemplate checks for differences between current deployment config template and deployment config template encoded in the latest replication controller. If they are different it will return an string diff containing the change.
func HasSynced ¶
func HasSynced(dc *appsapi.DeploymentConfig, generation int64) bool
HasSynced checks if the provided deployment config has been noticed by the deployment config controller.
func HasTrigger ¶
func HasTrigger(config *appsapi.DeploymentConfig) bool
HasTrigger returns whether the provided deployment configuration has any trigger defined or not.
func HasUpdatedImages ¶
func HasUpdatedImages(dc *appsapi.DeploymentConfig, rc *v1.ReplicationController) (bool, []string)
HasUpdatedImages indicates if the deployment configuration images were updated.
func IsCompleteDeployment ¶
IsCompleteDeployment returns true if the passed deployment is in state complete.
func IsDeploymentCancelled ¶
func IsFailedDeployment ¶
IsFailedDeployment returns true if the passed deployment failed.
func IsInitialDeployment ¶
func IsInitialDeployment(config *appsapi.DeploymentConfig) bool
IsInitialDeployment returns whether the deployment configuration is the first version of this configuration.
func IsOwnedByConfig ¶
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 IsProgressing ¶
func IsProgressing(config *appsapi.DeploymentConfig, newStatus *appsapi.DeploymentConfigStatus) bool
IsProgressing expects a state deployment config and its updated status in order to determine if there is any progress.
func IsTerminatedDeployment ¶
IsTerminatedDeployment returns true if the passed deployment has terminated (either complete or failed).
func LabelForDeployment ¶
func LabelForDeployment(deployment *v1.ReplicationController) string
LabelForDeployment builds a string identifier for a Deployment.
func LabelForDeploymentConfig ¶
func LabelForDeploymentConfig(config *appsapi.DeploymentConfig) string
LabelForDeploymentConfig builds a string identifier for a DeploymentConfig.
func LatestDeploymentInfo ¶
func LatestDeploymentInfo(config *appsapi.DeploymentConfig, deployments []*v1.ReplicationController) (bool, *v1.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 ¶
func LatestDeploymentNameForConfig(config *appsapi.DeploymentConfig) string
LatestDeploymentNameForConfig returns a stable identifier for config based on its version.
func MakeDeploymentV1FromInternalConfig ¶
func MakeDeploymentV1FromInternalConfig(config *appsapi.DeploymentConfig) (*v1.ReplicationController, error)
makeDeploymentV1 creates a deployment represented as a ReplicationController and based on the given DeploymentConfig. The controller replica count will be zero. DEPRECATED: Use external MakeDeployment
func MakeTestOnlyInternalDeployment ¶
func MakeTestOnlyInternalDeployment(config *appsapi.DeploymentConfig) (*api.ReplicationController, error)
MakeTestOnlyInternalDeployment creates a deployment represented as an internal ReplicationController and based on the given DeploymentConfig. The controller replica count will be zero. DEPRECATED: Will be replaced with external version eventually.
func MaxSurge ¶
func MaxSurge(config appsapi.DeploymentConfig) int32
MaxSurge returns the maximum surge pods a rolling deployment config can take.
func MaxUnavailable ¶
func MaxUnavailable(config *appsapi.DeploymentConfig) int32
MaxUnavailable returns the maximum unavailable pods a rolling deployment config can take.
func NewDeploymentCondition ¶
func NewDeploymentCondition(condType appsapi.DeploymentConditionType, status api.ConditionStatus, reason appsapi.DeploymentConditionReason, message string) *appsapi.DeploymentCondition
NewDeploymentCondition creates a new deployment condition.
func RecordConfigChangeCause ¶
func RecordConfigChangeCause(config *appsapi.DeploymentConfig)
RecordConfigChangeCause sets a deployment config cause for config change.
func RecordImageChangeCauses ¶
func RecordImageChangeCauses(config *appsapi.DeploymentConfig, imageNames []string)
RecordImageChangeCauses sets a deployment config cause for image change. It takes a list of changed images and record an cause for each image.
func RemoveDeploymentCondition ¶
func RemoveDeploymentCondition(status *appsapi.DeploymentConfigStatus, condType appsapi.DeploymentConditionType)
RemoveDeploymentCondition removes the deployment condition with the provided type.
func RolloutExceededTimeoutSeconds ¶
func RolloutExceededTimeoutSeconds(config *appsapi.DeploymentConfig, latestRC *v1.ReplicationController) bool
RolloutExceededTimeoutSeconds returns true if the current deployment exceeded the timeoutSeconds defined for its strategy. Note that this is different than activeDeadlineSeconds which is the timeout set for the deployer pod. In some cases, the deployer pod cannot be created (like quota, etc...). In that case deployer controller use this function to measure if the created deployment (RC) exceeded the timeout.
func SetDeploymentCondition ¶
func SetDeploymentCondition(status *appsapi.DeploymentConfigStatus, condition appsapi.DeploymentCondition)
SetDeploymentCondition updates the deployment to include the provided condition. If the condition that we are about to add already exists and has the same status and reason then we are not going to update.
Types ¶
This section is empty.