Documentation
¶
Index ¶
- Constants
- func ActiveDeployment(input []*v1.ReplicationController) *v1.ReplicationController
- func AnnotationFor(obj runtime.Object, key string) string
- func CanTransitionPhase(current, next appsv1.DeploymentStatus) bool
- func ConfigSelector(name string) labels.Selector
- func DecodeDeploymentConfig(controller metav1.ObjectMetaAccessor) (*appsv1.DeploymentConfig, error)
- func DeleteStatusReasons(rc *v1.ReplicationController)
- func DeployerPodNameFor(obj runtime.Object) string
- func DeployerPodNameForDeployment(deployment string) string
- func DeployerPodSelector(name string) labels.Selector
- func DeploymentConfigNameFor(obj runtime.Object) string
- func DeploymentDesiredReplicas(obj runtime.Object) (int32, bool)
- func DeploymentNameFor(obj runtime.Object) string
- func DeploymentNameForConfigVersion(name string, version int64) string
- func DeploymentStatusFor(deployment runtime.Object) appsv1.DeploymentStatus
- func DeploymentStatusReasonFor(obj runtime.Object) string
- func DeploymentVersionFor(obj runtime.Object) int64
- func DeploymentsForCleanup(configuration *appsv1.DeploymentConfig, ...) []v1.ReplicationController
- func GetAvailableReplicaCountForReplicationControllers(replicationControllers []*v1.ReplicationController) int32
- func GetDeploymentCondition(status appsv1.DeploymentConfigStatus, condType appsv1.DeploymentConditionType) *appsv1.DeploymentCondition
- func GetReadyReplicaCountForReplicationControllers(replicationControllers []*v1.ReplicationController) int32
- func GetReplicaCountForDeployments(deployments []*v1.ReplicationController) int32
- func GetStatusReplicaCountForDeployments(deployments []*v1.ReplicationController) int32
- func GetTimeoutSecondsForStrategy(config *appsv1.DeploymentConfig) int64
- func HasChangeTrigger(config *appsv1.DeploymentConfig) bool
- func HasImageChangeTrigger(config *appsv1.DeploymentConfig) bool
- func HasLastTriggeredImage(config *appsv1.DeploymentConfig) bool
- func HasLatestPodTemplate(currentConfig *appsv1.DeploymentConfig, rc *v1.ReplicationController) (bool, string, error)
- func HasSynced(dc *appsv1.DeploymentConfig, generation int64) bool
- func HasTrigger(config *appsv1.DeploymentConfig) bool
- func HasUpdatedImages(dc *appsv1.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 *appsv1.DeploymentConfig) bool
- func IsOwnedByConfig(obj metav1.Object) bool
- func IsProgressing(config *appsv1.DeploymentConfig, newStatus *appsv1.DeploymentConfigStatus) bool
- func IsRollingConfig(config *appsv1.DeploymentConfig) bool
- func IsTerminatedDeployment(deployment runtime.Object) bool
- func LabelForDeployment(deployment *v1.ReplicationController) string
- func LabelForDeploymentConfig(config runtime.Object) string
- func LatestDeploymentInfo(config *appsv1.DeploymentConfig, deployments []*v1.ReplicationController) (bool, *v1.ReplicationController)
- func LatestDeploymentNameForConfig(config *appsv1.DeploymentConfig) string
- func LatestDeploymentNameForConfigAndVersion(name string, version int64) string
- func MakeDeployment(config *appsv1.DeploymentConfig) (*v1.ReplicationController, error)
- func MaxSurge(config appsv1.DeploymentConfig) int32
- func MaxUnavailable(config *appsv1.DeploymentConfig) int32
- func NewDeploymentCondition(condType appsv1.DeploymentConditionType, status v1.ConditionStatus, ...) *appsv1.DeploymentCondition
- func NewReplicationControllerScaleClient(client kubernetes.Interface) scaleclient.ScalesGetter
- func NewReplicationControllerScaler(client kubernetes.Interface) kubectl.Scaler
- func RecordConfigChangeCause(config *appsv1.DeploymentConfig)
- func RecordImageChangeCauses(config *appsv1.DeploymentConfig, imageNames []string)
- func RemoveDeploymentCondition(status *appsv1.DeploymentConfigStatus, condType appsv1.DeploymentConditionType)
- func ResolveFenceposts(maxSurge, maxUnavailable *intstrutil.IntOrString, desired int32) (int32, int32, error)
- func RolloutExceededTimeoutSeconds(config *appsv1.DeploymentConfig, latestRC *v1.ReplicationController) bool
- func SetCancelledByNewerDeployment(rc *v1.ReplicationController)
- func SetCancelledByUserReason(rc *v1.ReplicationController)
- func SetDeploymentCondition(status *appsv1.DeploymentConfigStatus, condition appsv1.DeploymentCondition)
- func SetDeploymentLatestVersionAnnotation(rc *v1.ReplicationController, version string)
- type ByLatestVersionAsc
- type ByLatestVersionDesc
Constants ¶
View Source
const ( // FailedRcCreateReason is added in a deployment config when it cannot create a new replication // controller. FailedRcCreateReason = "ReplicationControllerCreateError" // NewReplicationControllerReason is added in a deployment config when it creates a new replication // controller. NewReplicationControllerReason = "NewReplicationControllerCreated" // NewRcAvailableReason is added in a deployment config when its newest replication controller is made // available ie. the number of new pods that have passed readiness checks and run for at least // minReadySeconds is at least the minimum available pods that need to run for the deployment config. NewRcAvailableReason = "NewReplicationControllerAvailable" // TimedOutReason is added in a deployment config when its newest replication controller fails to show // any progress within the given deadline (progressDeadlineSeconds). TimedOutReason = "ProgressDeadlineExceeded" // PausedConfigReason is added in a deployment config when it is paused. Lack of progress shouldn't be // estimated once a deployment config is paused. PausedConfigReason = "DeploymentConfigPaused" // CancelledRolloutReason is added in a deployment config when its newest rollout was // interrupted by cancellation. CancelledRolloutReason = "RolloutCancelled" // DeploymentConfigLabel is the name of a label used to correlate a deployment with the DeploymentConfigLabel = "deploymentconfig" // DeploymentLabel is the name of a label used to correlate a deployment with the Pod created DeploymentLabel = "deployment" // MaxDeploymentDurationSeconds represents the maximum duration that a deployment is allowed to run. // This is set as the default value for ActiveDeadlineSeconds for the deployer pod. // Currently set to 6 hours. MaxDeploymentDurationSeconds int64 = 21600 // DefaultRecreateTimeoutSeconds is the default TimeoutSeconds for RecreateDeploymentStrategyParams. // Used by strategies: DefaultRecreateTimeoutSeconds int64 = 10 * 60 DefaultRollingTimeoutSeconds int64 = 10 * 60 // PreHookPodSuffix is the suffix added to all pre hook pods PreHookPodSuffix = "hook-pre" // MidHookPodSuffix is the suffix added to all mid hook pods MidHookPodSuffix = "hook-mid" // PostHookPodSuffix is the suffix added to all post hook pods PostHookPodSuffix = "hook-post" // DeploymentStatusReasonAnnotation represents the reason for deployment being in a given state // Used for specifying the reason for cancellation or failure of a deployment DeploymentIgnorePodAnnotation = "deploy.openshift.io/deployer-pod.ignore" DeploymentReplicasAnnotation = "openshift.io/deployment.replicas" DeploymentFailedUnableToCreateDeployerPod = "unable to create deployer pod" DeploymentFailedDeployerPodNoLongerExists = "deployer pod no longer exists" )
Variables ¶
This section is empty.
Functions ¶
func ActiveDeployment ¶
func ActiveDeployment(input []*v1.ReplicationController) *v1.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 AnnotationFor ¶
AnnotationFor returns the annotation with key for obj.
func CanTransitionPhase ¶
func CanTransitionPhase(current, next appsv1.DeploymentStatus) bool
CanTransitionPhase returns whether it is allowed to go from the current to the next phase.