@@ -34,15 +34,15 @@ type ClusterOperatorSpec struct {
3434// ClusterOperatorStatus provides information about the status of the operator.
3535// +k8s:deepcopy-gen=true
3636type ClusterOperatorStatus struct {
37- // conditions describes the state of the operator's reconciliation functionality .
37+ // conditions describes the state of the operator's managed and monitored components .
3838 // +patchMergeKey=type
3939 // +patchStrategy=merge
4040 // +optional
4141 Conditions []ClusterOperatorStatusCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
4242
43- // versions is a slice of operand version tuples. Operators which manage multiple operands will have multiple
44- // entries in the array. If an operator is Available, it must have at least one entry. You must report the version of
45- // the operator itself with the name "operator".
43+ // versions is a slice of operator and operand version tuples. Operators which manage multiple operands will have multiple
44+ // operand entries in the array. Available operators must report the version of the operator itself with the name "operator".
45+ // An operator reports a new "operator" version when it has rolled out the new version to all of its operands .
4646 // +optional
4747 Versions []OperandVersion `json:"versions,omitempty"`
4848
@@ -67,8 +67,8 @@ type OperandVersion struct {
6767 // +required
6868 Name string `json:"name"`
6969
70- // version indicates which version of a particular operand is currently being manage . It must always match the Available
71- // condition . If 1.0.0 is Available, then this must indicate 1.0.0 even if the operator is trying to rollout
70+ // version indicates which version of a particular operand is currently being managed . It must always match the Available
71+ // operand . If 1.0.0 is Available, then this must indicate 1.0.0 even if the operator is trying to rollout
7272 // 1.1.0
7373 // +kubebuilder:validation:Required
7474 // +required
@@ -107,10 +107,10 @@ const (
107107)
108108
109109// ClusterOperatorStatusCondition represents the state of the operator's
110- // reconciliation functionality .
110+ // managed and monitored components .
111111// +k8s:deepcopy-gen=true
112112type ClusterOperatorStatusCondition struct {
113- // type specifies the state of the operator's reconciliation functionality .
113+ // type specifies the aspect reported by this condition .
114114 // +kubebuilder:validation:Required
115115 // +required
116116 Type ClusterStatusConditionType `json:"type"`
@@ -120,12 +120,12 @@ type ClusterOperatorStatusCondition struct {
120120 // +required
121121 Status ConditionStatus `json:"status"`
122122
123- // lastTransitionTime is the time of the last update to the current status object .
123+ // lastTransitionTime is the time of the last update to the current status property .
124124 // +kubebuilder:validation:Required
125125 // +required
126126 LastTransitionTime metav1.Time `json:"lastTransitionTime"`
127127
128- // reason is the reason for the condition's last transition. Reasons are CamelCase
128+ // reason is the CamelCase reason for the condition's current status.
129129 // +optional
130130 Reason string `json:"reason,omitempty"`
131131
@@ -135,21 +135,40 @@ type ClusterOperatorStatusCondition struct {
135135 Message string `json:"message,omitempty"`
136136}
137137
138- // ClusterStatusConditionType is the state of the operator's reconciliation functionality .
138+ // ClusterStatusConditionType is an aspect of operator state .
139139type ClusterStatusConditionType string
140140
141141const (
142- // Available indicates that the binary maintained by the operator (eg: openshift-apiserver for the
142+ // Available indicates that the operand (eg: openshift-apiserver for the
143143 // openshift-apiserver-operator), is functional and available in the cluster.
144144 OperatorAvailable ClusterStatusConditionType = "Available"
145145
146- // Progressing indicates that the operator is actively making changes to the binary maintained by the
147- // operator (eg: openshift-apiserver for the openshift-apiserver-operator).
146+ // Progressing indicates that the operator is actively rolling out new code,
147+ // propagating config changes, or otherwise moving from one steady state to
148+ // another. Operators should not report progressing when they are reconciling
149+ // a previously known state.
148150 OperatorProgressing ClusterStatusConditionType = "Progressing"
149151
150152 // Degraded indicates that the operand is not functioning completely. An example of a degraded state
151153 // would be if there should be 5 copies of the operand running but only 4 are running. It may still be available,
152154 // but it is degraded
155+
156+ // Degraded indicated that the operator's current state does not match its
157+ // desired state over a period of time resulting in a lower quality of service.
158+ // The period of time may vary by component, but a Degraded state represents
159+ // persistent observation of a condition. As a result, a component should not
160+ // oscillate in and out of Degraded state. A service may be Available even
161+ // if its degraded. For example, your service may desire 3 running pods, but 1
162+ // pod is crash-looping. The service is Available but Degraded because it
163+ // may have a lower quality of service. A component may be Progressing but
164+ // not Degraded because the transition from one state to another does not
165+ // persist over a long enough period to report Degraded. A service should not
166+ // report Degraded during the course of a normal upgrade. A service may report
167+ // Degraded in response to a persistent infrastructure failure that requires
168+ // administrator intervention. For example, if a control plane host is unhealthy
169+ // and must be replaced. An operator should report Degraded if unexpected
170+ // errors occur over a period, but the expectation is that all unexpected errors
171+ // are handled as operators mature.
153172 OperatorDegraded ClusterStatusConditionType = "Degraded"
154173
155174 // Upgradeable indicates whether the operator is in a state that is safe to upgrade. When status is `False`
0 commit comments