Skip to content

Commit facd1e6

Browse files
committed
Revert "Merge pull request openshift#570 from openshift-bot/synchronize-upstream"
This reverts commit 93bf7ab, reversing changes made to 496965e.
1 parent da9278b commit facd1e6

21 files changed

+135
-1044
lines changed

api/v1/clusterextensionrevision_types.go

Lines changed: 25 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,11 @@ import (
2424
const (
2525
ClusterExtensionRevisionKind = "ClusterExtensionRevision"
2626

27-
// ClusterExtensionRevisionTypeAvailable is the condition type that represents whether the
28-
// ClusterExtensionRevision is available and has been successfully rolled out.
27+
// Condition Types
2928
ClusterExtensionRevisionTypeAvailable = "Available"
30-
31-
// ClusterExtensionRevisionTypeSucceeded is the condition type that represents whether the
32-
// ClusterExtensionRevision rollout has succeeded.
3329
ClusterExtensionRevisionTypeSucceeded = "Succeeded"
3430

35-
// Condition reasons
31+
// Condition Reasons
3632
ClusterExtensionRevisionReasonAvailable = "Available"
3733
ClusterExtensionRevisionReasonReconcileFailure = "ReconcileFailure"
3834
ClusterExtensionRevisionReasonRevisionValidationFailure = "RevisionValidationFailure"
@@ -48,47 +44,22 @@ const (
4844

4945
// ClusterExtensionRevisionSpec defines the desired state of ClusterExtensionRevision.
5046
type ClusterExtensionRevisionSpec struct {
51-
// lifecycleState specifies the lifecycle state of the ClusterExtensionRevision.
52-
//
53-
// When set to "Active" (the default), the revision is actively managed and reconciled.
54-
// When set to "Archived", the revision is inactive and any resources not managed by a subsequent revision are deleted.
55-
// The revision is removed from the owner list of all objects previously under management.
56-
// All objects that did not transition to a succeeding revision are deleted.
57-
//
58-
// Once a revision is set to "Archived", it cannot be un-archived.
47+
// Specifies the lifecycle state of the ClusterExtensionRevision.
5948
//
6049
// +kubebuilder:default="Active"
61-
// +kubebuilder:validation:Enum=Active;Archived
62-
// +kubebuilder:validation:XValidation:rule="oldSelf == 'Active' || oldSelf == 'Archived' && oldSelf == self", message="cannot un-archive"
50+
// +kubebuilder:validation:Enum=Active;Paused;Archived
51+
// +kubebuilder:validation:XValidation:rule="oldSelf == 'Active' || oldSelf == 'Paused' || oldSelf == 'Archived' && oldSelf == self", message="can not un-archive"
6352
LifecycleState ClusterExtensionRevisionLifecycleState `json:"lifecycleState,omitempty"`
64-
65-
// revision is a required, immutable sequence number representing a specific revision
66-
// of the parent ClusterExtension.
67-
//
68-
// The revision field must be a positive integer.
69-
// Each ClusterExtensionRevision belonging to the same parent ClusterExtension must have a unique revision number.
70-
// The revision number must always be the previous revision number plus one, or 1 for the first revision.
53+
// Revision is a sequence number representing a specific revision of the ClusterExtension instance.
54+
// Must be positive. Each ClusterExtensionRevision of the same parent ClusterExtension needs to have
55+
// a unique value assigned. It is immutable after creation. The new revision number must always be previous revision +1.
7156
//
7257
// +kubebuilder:validation:Required
7358
// +kubebuilder:validation:Minimum:=1
7459
// +kubebuilder:validation:XValidation:rule="self == oldSelf", message="revision is immutable"
7560
Revision int64 `json:"revision"`
76-
77-
// phases is an optional, immutable list of phases that group objects to be applied together.
78-
//
79-
// Objects are organized into phases based on their Group-Kind. Common phases include:
80-
// - namespaces: Namespace objects
81-
// - policies: ResourceQuota, LimitRange, NetworkPolicy objects
82-
// - rbac: ServiceAccount, Role, RoleBinding, ClusterRole, ClusterRoleBinding objects
83-
// - crds: CustomResourceDefinition objects
84-
// - storage: PersistentVolume, PersistentVolumeClaim, StorageClass objects
85-
// - deploy: Deployment, StatefulSet, DaemonSet, Service, ConfigMap, Secret objects
86-
// - publish: Ingress, APIService, Route, Webhook objects
87-
//
88-
// All objects in a phase are applied in no particular order.
89-
// The revision progresses to the next phase only after all objects in the current phase pass their readiness probes.
90-
//
91-
// Once set, even if empty, the phases field is immutable.
61+
// Phases are groups of objects that will be applied at the same time.
62+
// All objects in the phase will have to pass their probes in order to progress to the next phase.
9263
//
9364
// +kubebuilder:validation:XValidation:rule="self == oldSelf || oldSelf.size() == 0", message="phases is immutable"
9465
// +listType=map
@@ -104,62 +75,33 @@ const (
10475
// ClusterExtensionRevisionLifecycleStateActive / "Active" is the default lifecycle state.
10576
ClusterExtensionRevisionLifecycleStateActive ClusterExtensionRevisionLifecycleState = "Active"
10677
// ClusterExtensionRevisionLifecycleStatePaused / "Paused" disables reconciliation of the ClusterExtensionRevision.
107-
// Object changes will not be reconciled. However, status updates will be propagated.
78+
// Only Status updates will still propagated, but object changes will not be reconciled.
10879
ClusterExtensionRevisionLifecycleStatePaused ClusterExtensionRevisionLifecycleState = "Paused"
109-
// ClusterExtensionRevisionLifecycleStateArchived / "Archived" archives the revision for historical or auditing purposes.
110-
// The revision is removed from the owner list of all other objects previously under management and all objects
111-
// that did not transition to a succeeding revision are deleted.
80+
// ClusterExtensionRevisionLifecycleStateArchived / "Archived" disables reconciliation while also "scaling to zero",
81+
// which deletes all objects that are not excluded via the pausedFor property and
82+
// removes itself from the owner list of all other objects previously under management.
11283
ClusterExtensionRevisionLifecycleStateArchived ClusterExtensionRevisionLifecycleState = "Archived"
11384
)
11485

115-
// ClusterExtensionRevisionPhase represents a group of objects that are applied together. The phase is considered
116-
// complete only after all objects pass their status probes.
86+
// ClusterExtensionRevisionPhase are groups of objects that will be applied at the same time.
87+
// All objects in the a phase will have to pass their probes in order to progress to the next phase.
11788
type ClusterExtensionRevisionPhase struct {
118-
// name is a required identifier for this phase.
119-
//
120-
// phase names must follow the DNS label standard as defined in [RFC 1123].
121-
// They must contain only lowercase alphanumeric characters or hyphens (-),
122-
// start and end with an alphanumeric character, and be no longer than 63 characters.
123-
//
124-
// Common phase names include: namespaces, policies, rbac, crds, storage, deploy, publish.
125-
//
126-
// [RFC 1123]: https://tools.ietf.org/html/rfc1123
89+
// Name identifies this phase.
12790
//
12891
// +kubebuilder:validation:MaxLength=63
12992
// +kubebuilder:validation:Pattern=`^[a-z]([-a-z0-9]*[a-z0-9])?$`
13093
Name string `json:"name"`
131-
132-
// objects is a required list of all Kubernetes objects that belong to this phase.
133-
//
134-
// All objects in this list are applied to the cluster in no particular order.
94+
// Objects are a list of all the objects within this phase.
13595
Objects []ClusterExtensionRevisionObject `json:"objects"`
13696
}
13797

138-
// ClusterExtensionRevisionObject represents a Kubernetes object to be applied as part
139-
// of a phase, along with its collision protection settings.
98+
// ClusterExtensionRevisionObject contains an object and settings for it.
14099
type ClusterExtensionRevisionObject struct {
141-
// object is a required embedded Kubernetes object to be applied.
142-
//
143-
// This object must be a valid Kubernetes resource with apiVersion, kind, and metadata fields.
144-
//
145100
// +kubebuilder:validation:EmbeddedResource
146101
// +kubebuilder:pruning:PreserveUnknownFields
147102
Object unstructured.Unstructured `json:"object"`
148-
149-
// collisionProtection controls whether the operator can adopt and modify objects
150-
// that already exist on the cluster.
151-
//
152-
// When set to "Prevent" (the default), the operator only manages objects it created itself.
153-
// This prevents ownership collisions.
154-
//
155-
// When set to "IfNoController", the operator can adopt and modify pre-existing objects
156-
// that are not owned by another controller.
157-
// This is useful for taking over management of manually-created resources.
158-
//
159-
// When set to "None", the operator can adopt and modify any pre-existing object, even if
160-
// owned by another controller.
161-
// Use this setting with extreme caution as it may cause multiple controllers to fight over
162-
// the same resource, resulting in increased load on the API server and etcd.
103+
// CollisionProtection controls whether OLM can adopt and modify objects
104+
// already existing on the cluster or even owned by another controller.
163105
//
164106
// +kubebuilder:default="Prevent"
165107
// +kubebuilder:validation:Enum=Prevent;IfNoController;None
@@ -186,27 +128,6 @@ const (
186128

187129
// ClusterExtensionRevisionStatus defines the observed state of a ClusterExtensionRevision.
188130
type ClusterExtensionRevisionStatus struct {
189-
// conditions is an optional list of status conditions describing the state of the
190-
// ClusterExtensionRevision.
191-
//
192-
// The Progressing condition represents whether the revision is actively rolling out:
193-
// - When status is True and reason is Progressing, the revision rollout is actively making progress and is in transition.
194-
// - When Progressing is not present, the revision is not currently in transition.
195-
//
196-
// The Available condition represents whether the revision has been successfully rolled out and is available:
197-
// - When status is True and reason is Available, the revision has been successfully rolled out and all objects pass their readiness probes.
198-
// - When status is False and reason is Incomplete, the revision rollout has not yet completed but no specific failures have been detected.
199-
// - When status is False and reason is ProbeFailure, one or more objects are failing their readiness probes during rollout.
200-
// - When status is False and reason is ReconcileFailure, the revision has encountered a general reconciliation failure.
201-
// - When status is False and reason is RevisionValidationFailure, the revision failed preflight validation checks.
202-
// - When status is False and reason is PhaseValidationError, a phase within the revision failed preflight validation checks.
203-
// - When status is False and reason is ObjectCollisions, objects in the revision collide with existing cluster objects that cannot be adopted.
204-
// - When status is Unknown and reason is Archived, the revision has been archived and its objects have been torn down.
205-
// - When status is Unknown and reason is Migrated, the revision was migrated from an existing release and object status probe results have not yet been observed.
206-
//
207-
// The Succeeded condition represents whether the revision has successfully completed its rollout:
208-
// - When status is True and reason is RolloutSuccess, the revision has successfully completed its rollout. This condition is set once and persists even if the revision later becomes unavailable.
209-
//
210131
// +listType=map
211132
// +listMapKey=type
212133
// +optional
@@ -216,24 +137,19 @@ type ClusterExtensionRevisionStatus struct {
216137
// +kubebuilder:object:root=true
217138
// +kubebuilder:resource:scope=Cluster
218139
// +kubebuilder:subresource:status
140+
141+
// ClusterExtensionRevision is the Schema for the clusterextensionrevisions API
219142
// +kubebuilder:printcolumn:name="Available",type=string,JSONPath=`.status.conditions[?(@.type=='Available')].status`
220143
// +kubebuilder:printcolumn:name=Age,type=date,JSONPath=`.metadata.creationTimestamp`
221-
222-
// ClusterExtensionRevision represents an immutable snapshot of Kubernetes objects
223-
// for a specific version of a ClusterExtension. Each revision contains objects
224-
// organized into phases that roll out sequentially. The same object can only be managed by a single revision
225-
// at a time. Ownership of objects is transitioned from one revision to the next as the extension is upgraded
226-
// or reconfigured. Once the latest revision has rolled out successfully, previous active revisions are archived for
227-
// posterity.
228144
type ClusterExtensionRevision struct {
229145
metav1.TypeMeta `json:",inline"`
230146
metav1.ObjectMeta `json:"metadata,omitempty"`
231147

232-
// spec defines the desired state of the ClusterExtensionRevision.
148+
// spec is an optional field that defines the desired state of the ClusterExtension.
233149
// +optional
234150
Spec ClusterExtensionRevisionSpec `json:"spec,omitempty"`
235151

236-
// status is optional and defines the observed state of the ClusterExtensionRevision.
152+
// status is an optional field that defines the observed state of the ClusterExtension.
237153
// +optional
238154
Status ClusterExtensionRevisionStatus `json:"status,omitempty"`
239155
}

commitchecker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
expectedMergeBase: 34394ce0a7067e1f1622dc2c381a9a12439b10d2
1+
expectedMergeBase: 045989d84a7570b1cfddeee47eae64d47245aff2
22
upstreamBranch: main
33
upstreamOrg: operator-framework
44
upstreamRepo: operator-controller

hack/test/install-prometheus.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,8 @@ echo "Patching namespace to ${PROMETHEUS_NAMESPACE}..."
3838
echo "Applying Prometheus base..."
3939
kubectl apply -k "$TMPDIR" --server-side
4040

41-
echo "Waiting for Prometheus Operator deployment to become available..."
42-
kubectl wait --for=condition=Available deployment/prometheus-operator -n "$PROMETHEUS_NAMESPACE" --timeout=180s
43-
4441
echo "Waiting for Prometheus Operator pod to become ready..."
45-
kubectl wait --for=condition=Ready pod -n "$PROMETHEUS_NAMESPACE" -l app.kubernetes.io/name=prometheus-operator --timeout=120s
42+
kubectl wait --for=condition=Ready pod -n "$PROMETHEUS_NAMESPACE" -l app.kubernetes.io/name=prometheus-operator
4643

4744
echo "Applying prometheus Helm chart..."
4845
${HELM} template prometheus helm/prometheus ${PROMETHEUS_VALUES} | sed "s/cert-git-version/cert-${VERSION}/g" | kubectl apply -f -

hack/tools/crd-generator/README.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ A semi-colon separated list of enumerations, similar to the `+kubebuilder:valida
3333

3434
An XValidation scheme, similar to the `+kubebuilder:validation:XValidation` scheme, but more limited.
3535

36-
* `Optional`
37-
38-
Indicating that this field should not be listed as required in its parent.
39-
40-
* `Required`
41-
42-
Indicating that this field should be listed as required in its parent.
43-
4436
## Experimental Description
4537

4638
* Start Tag: `<opcon:experimental:description>`
@@ -52,18 +44,6 @@ All text between the tags is included in the experimental CRD, but removed from
5244
This is only useful if the field is included in the standard CRD, but there's additional meaning in
5345
the experimental CRD when feature gates are enabled.
5446

55-
## Standard Description
56-
57-
* Start Tag: `<opcon:standard:description>`
58-
* End Tag: `</opcon:standard:description>`
59-
60-
Descriptive text that is only included as part of the field description within the standard CRD.
61-
All text between the tags is included in the standard CRD, but removed from the experimental CRD.
62-
63-
This is useful if the field is included in the standard CRD and has differing meaning than when the
64-
field is used in the experimental CRD when feature gates are enabled.
65-
66-
6747
## Exclude from CRD Description
6848

6949
* Start Tag: `<opcon:util:excludeFromCRD>`

0 commit comments

Comments
 (0)