/
consts.go
124 lines (96 loc) · 6.22 KB
/
consts.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*
Copyright AppsCode Inc. and Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
const (
// DeploymentStatusReasonAnnotation represents the reason for deployment being in a given state
// Used for specifying the reason for cancellation or failure of a deployment
// This is on replication controller set by deployer controller.
DeploymentStatusReasonAnnotation = "openshift.io/deployment.status-reason"
// DeploymentPodAnnotation is an annotation on a deployment (a ReplicationController). The
// annotation value is the name of the deployer Pod which will act upon the ReplicationController
// to implement the deployment behavior.
// This is set on replication controller by deployer controller.
DeploymentPodAnnotation = "openshift.io/deployer-pod.name"
// DeploymentConfigAnnotation is an annotation name used to correlate a deployment with the
// DeploymentConfig on which the deployment is based.
// This is set on replication controller pod template by deployer controller.
DeploymentConfigAnnotation = "openshift.io/deployment-config.name"
// DeploymentCancelledAnnotation indicates that the deployment has been cancelled
// The annotation value does not matter and its mere presence indicates cancellation.
// This is set on replication controller by deployment config controller or oc rollout cancel command.
DeploymentCancelledAnnotation = "openshift.io/deployment.cancelled"
// DeploymentEncodedConfigAnnotation is an annotation name used to retrieve specific encoded
// DeploymentConfig on which a given deployment is based.
// This is set on replication controller by deployer controller.
DeploymentEncodedConfigAnnotation = "openshift.io/encoded-deployment-config"
// DeploymentVersionAnnotation is an annotation on a deployment (a ReplicationController). The
// annotation value is the LatestVersion value of the DeploymentConfig which was the basis for
// the deployment.
// This is set on replication controller pod template by deployment config controller.
DeploymentVersionAnnotation = "openshift.io/deployment-config.latest-version"
// DeployerPodForDeploymentLabel is a label which groups pods related to a
// deployment. The value is a deployment name. The deployer pod and hook pods
// created by the internal strategies will have this label. Custom
// strategies can apply this label to any pods they create, enabling
// platform-provided cancellation and garbage collection support.
// This is set on deployer pod by deployer controller.
DeployerPodForDeploymentLabel = "openshift.io/deployer-pod-for.name"
// DeploymentStatusAnnotation is an annotation name used to retrieve the DeploymentPhase of
// a deployment.
// This is set on replication controller by deployer controller.
DeploymentStatusAnnotation = "openshift.io/deployment.phase"
)
type DeploymentConditionReason string
var (
// ReplicationControllerUpdatedReason is added in a deployment config when one of its replication
// controllers is updated as part of the rollout process.
ReplicationControllerUpdatedReason DeploymentConditionReason = "ReplicationControllerUpdated"
// ReplicationControllerCreateError is added in a deployment config when it cannot create a new replication
// controller.
ReplicationControllerCreateErrorReason DeploymentConditionReason = "ReplicationControllerCreateError"
// ReplicationControllerCreatedReason is added in a deployment config when it creates a new replication
// controller.
NewReplicationControllerCreatedReason DeploymentConditionReason = "NewReplicationControllerCreated"
// NewReplicationControllerAvailableReason 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.
NewReplicationControllerAvailableReason DeploymentConditionReason = "NewReplicationControllerAvailable"
// ProgressDeadlineExceededReason is added in a deployment config when its newest replication controller fails to show
// any progress within the given deadline (progressDeadlineSeconds).
ProgressDeadlineExceededReason DeploymentConditionReason = "ProgressDeadlineExceeded"
// DeploymentConfigPausedReason is added in a deployment config when it is paused. Lack of progress shouldn't be
// estimated once a deployment config is paused.
DeploymentConfigPausedReason DeploymentConditionReason = "DeploymentConfigPaused"
// DeploymentConfigResumedReason is added in a deployment config when it is resumed. Useful for not failing accidentally
// deployment configs that paused amidst a rollout.
DeploymentConfigResumedReason DeploymentConditionReason = "DeploymentConfigResumed"
// RolloutCancelledReason is added in a deployment config when its newest rollout was
// interrupted by cancellation.
RolloutCancelledReason DeploymentConditionReason = "RolloutCancelled"
)
// DeploymentStatus describes the possible states a deployment can be in.
type DeploymentStatus string
var (
// DeploymentStatusNew means the deployment has been accepted but not yet acted upon.
DeploymentStatusNew DeploymentStatus = "New"
// DeploymentStatusPending means the deployment been handed over to a deployment strategy,
// but the strategy has not yet declared the deployment to be running.
DeploymentStatusPending DeploymentStatus = "Pending"
// DeploymentStatusRunning means the deployment strategy has reported the deployment as
// being in-progress.
DeploymentStatusRunning DeploymentStatus = "Running"
// DeploymentStatusComplete means the deployment finished without an error.
DeploymentStatusComplete DeploymentStatus = "Complete"
// DeploymentStatusFailed means the deployment finished with an error.
DeploymentStatusFailed DeploymentStatus = "Failed"
)