apps: add DeploymentConditionReason to api#37
Conversation
|
@deads2k PTAL |
|
lgtm. I'll leave tagging to @liggitt because every pull that makes master differ, but isn't reconciled before a rebase is more risk of something breaking during the rebase. |
|
let's hold purely cosmetic changes like this |
| ReplicationControllerUpdatedReason DeploymentConditionReason = "ReplicationControllerUpdated" | ||
| // FailedRcCreateReason is added in a deployment config when it cannot create a new replication | ||
| // controller. | ||
| FailedRcCreateReason DeploymentConditionReason = "ReplicationControllerCreateError" |
There was a problem hiding this comment.
nit: RC (also, is there a reason to name the constant so differently from the value? these become public API and shouldn't change if we can avoid it)
| // 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 DeploymentConditionReason = "NewReplicationControllerAvailable" |
There was a problem hiding this comment.
harmonize constant name with actual value
|
in general, it is easier to find the constants you need if the variable names align with the values |
| TimedOutReason DeploymentConditionReason = "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 DeploymentConditionReason = "DeploymentConfigPaused" |
There was a problem hiding this comment.
I don't see this set. What sets it?
There was a problem hiding this comment.
I don't see this set. What sets it?
in origin I mean
And double check usage. |
@deads2k that is what I do in openshift/origin#20019 I moved all constants that we want to have in openshift/api into "pkg/apps/util" for now. These are used by both CLI and controllers/strategies so we should have them in a common library/package where clients can read them (things like status/timeouts/etc.). |
|
Closing in favor of #89 |
pkg/manifests: use yaml decoder to avoid conversion errors
Ref: openshift/origin#18269
This adds
DeploymentConditionReasonas API type, replacing thestringtype for DeploymentConditionReasonfield./cc @tnozicka