Skip to content

Commit 2f9d6cb

Browse files
Merge pull request #14877 from kargakis/document-progressing-condition
Update documentation for DC conditions
2 parents 3ffeee2 + 14ff57d commit 2f9d6cb

File tree

2 files changed

+36
-14
lines changed

2 files changed

+36
-14
lines changed

pkg/deploy/apis/apps/types.go

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -424,15 +424,26 @@ type DeploymentCauseImageTrigger struct {
424424

425425
type DeploymentConditionType string
426426

427-
// These are valid conditions of a deployment config.
427+
// These are valid conditions of a DeploymentConfig.
428428
const (
429-
// DeploymentAvailable means the deployment config is available, ie. at least the minimum available
430-
// replicas required are up and running for at least minReadySeconds.
429+
// DeploymentAvailable means the DeploymentConfig is available, ie. at least the minimum available
430+
// replicas required (dc.spec.replicas in case the DeploymentConfig is of Recreate type,
431+
// dc.spec.replicas - dc.spec.strategy.rollingParams.maxUnavailable in case it's Rolling) are up and
432+
// running for at least dc.spec.minReadySeconds.
431433
DeploymentAvailable DeploymentConditionType = "Available"
432-
// DeploymentProgressing means the deployment config is progressing. Progress for a deployment
433-
// config is considered when a new replica set is created or adopted, and when new pods scale up or
434-
// old pods scale down. Progress is not estimated for paused deployment configs, when the deployment
435-
// config needs to rollback, or when progressDeadlineSeconds is not specified.
434+
// DeploymentProgressing is:
435+
// * True: the DeploymentConfig has been successfully deployed or is amidst getting deployed.
436+
// The two different states can be determined by looking at the Reason of the Condition.
437+
// For example, a complete DC will have {Status: True, Reason: NewReplicationControllerAvailable}
438+
// and a DC in the middle of a rollout {Status: True, Reason: ReplicationControllerUpdated}.
439+
// TODO: Represent a successfully deployed DC by using something else for Status like Unknown?
440+
// * False: the DeploymentConfig has failed to deploy its latest version.
441+
//
442+
// This condition is purely informational and depends on the dc.spec.strategy.*params.timeoutSeconds
443+
// field, which is responsible for the time in seconds to wait for a rollout before deciding that
444+
// no progress can be made, thus the rollout is aborted.
445+
//
446+
// Progress for a DeploymentConfig is considered when new pods scale up or old pods scale down.
436447
DeploymentProgressing DeploymentConditionType = "Progressing"
437448
// DeploymentReplicaFailure is added in a deployment config when one of its pods
438449
// fails to be created or deleted.

pkg/deploy/apis/apps/v1/types.go

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -330,15 +330,26 @@ type DeploymentCauseImageTrigger struct {
330330

331331
type DeploymentConditionType string
332332

333-
// These are valid conditions of a deployment config.
333+
// These are valid conditions of a DeploymentConfig.
334334
const (
335-
// DeploymentAvailable means the deployment config is available, ie. at least the minimum available
336-
// replicas required are up and running for at least minReadySeconds.
335+
// DeploymentAvailable means the DeploymentConfig is available, ie. at least the minimum available
336+
// replicas required (dc.spec.replicas in case the DeploymentConfig is of Recreate type,
337+
// dc.spec.replicas - dc.spec.strategy.rollingParams.maxUnavailable in case it's Rolling) are up and
338+
// running for at least dc.spec.minReadySeconds.
337339
DeploymentAvailable DeploymentConditionType = "Available"
338-
// DeploymentProgressing means the deployment config is progressing. Progress for a deployment
339-
// config is considered when a new replica set is created or adopted, and when new pods scale up or
340-
// old pods scale down. Progress is not estimated for paused deployment configs, when the deployment
341-
// config needs to rollback, or when progressDeadlineSeconds is not specified.
340+
// DeploymentProgressing is:
341+
// * True: the DeploymentConfig has been successfully deployed or is amidst getting deployed.
342+
// The two different states can be determined by looking at the Reason of the Condition.
343+
// For example, a complete DC will have {Status: True, Reason: NewReplicationControllerAvailable}
344+
// and a DC in the middle of a rollout {Status: True, Reason: ReplicationControllerUpdated}.
345+
// TODO: Represent a successfully deployed DC by using something else for Status like Unknown?
346+
// * False: the DeploymentConfig has failed to deploy its latest version.
347+
//
348+
// This condition is purely informational and depends on the dc.spec.strategy.*params.timeoutSeconds
349+
// field, which is responsible for the time in seconds to wait for a rollout before deciding that
350+
// no progress can be made, thus the rollout is aborted.
351+
//
352+
// Progress for a DeploymentConfig is considered when new pods scale up or old pods scale down.
342353
DeploymentProgressing DeploymentConditionType = "Progressing"
343354
// DeploymentReplicaFailure is added in a deployment config when one of its pods
344355
// fails to be created or deleted.

0 commit comments

Comments
 (0)