From 4a51b4899e52f133425c79a41c82a31cea897f84 Mon Sep 17 00:00:00 2001 From: "Per G. da Silva" Date: Thu, 1 Oct 2026 16:00:15 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9A=A0=20rename=20ClusterObjectSet=20conditi?= =?UTF-8?q?on=20to=20Ready;=20keep=20ClusterExtension=20Available?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Decouple the ClusterExtension status contract from the internal ClusterObjectSet (COS) condition vocabulary. Previously both COS and ClusterExtension (CE) used a condition type named Available, and the operator-controller reader copied the COS Available condition straight through to the CE, coupling the user-facing CE contract to a COS implementation detail. Now: - ClusterObjectSet reports its health through a Ready condition instead of Available (aligns with the ReplicaSet/Pod-style layering where the lower layer is Ready and the higher layer is Available). The printer column is renamed accordingly. - ClusterExtension continues to expose a stable Available condition. The reader reads the COS Ready condition and re-types it to the CE-owned Available condition (new ocv1.TypeAvailable constant) before publishing, so the COS Ready type never leaks onto the ClusterExtension. The condition rename does not change the CRD schema (conditions is a generic list); only the COS printer column and field descriptions change. CRDs, manifests, and applyconfigurations are regenerated. Test: TestSetAvailableFromRevisionStates is a table-driven test over setAvailableFromRevisionStates asserting the COS Ready -> CE Available remap, status/reason/message/generation carry-through, and that the COS Ready type is never surfaced on the ClusterExtension. Co-Authored-By: Claude Opus 4.8 Signed-off-by: Per G. da Silva --- api/v1/clusterobjectset_types.go | 8 +- api/v1/common_types.go | 4 + .../api/v1/clusterobjectsetstatus.go | 4 +- cmd/object-controller/main_test.go | 2 +- ...peratorframework.io_clusterobjectsets.yaml | 8 +- .../clusterobjectset_controller.go | 6 +- .../clusterobjectset_controller_test.go | 46 ++++---- .../conditionsets/conditionsets.go | 1 + .../clusterextension_controller.go | 4 +- .../controllers/common_controller.go | 12 ++- .../controllers/common_controller_test.go | 100 +++++++++++++++--- manifests/experimental-e2e.yaml | 8 +- manifests/experimental.yaml | 8 +- test/e2e/features/install.feature | 4 +- test/e2e/features/revision.feature | 24 ++--- test/e2e/features/status.feature | 6 +- test/e2e/features/update.feature | 4 +- test/e2e/steps/steps.go | 4 +- 18 files changed, 169 insertions(+), 84 deletions(-) diff --git a/api/v1/clusterobjectset_types.go b/api/v1/clusterobjectset_types.go index fe6ad76fd0..d9c244749f 100644 --- a/api/v1/clusterobjectset_types.go +++ b/api/v1/clusterobjectset_types.go @@ -26,7 +26,7 @@ const ( ClusterObjectSetKind = "ClusterObjectSet" // Condition Types - ClusterObjectSetTypeAvailable = "Available" + ClusterObjectSetTypeReady = "Ready" // Condition Reasons ClusterObjectSetReasonArchived = "Archived" @@ -494,13 +494,13 @@ type ClusterObjectSetStatus struct { // conditions is an optional list of status conditions describing the state of the // ClusterObjectSet. // - // The Available condition represents the state of the revision. + // The Ready condition represents the state of the revision. // True means all objects are at the desired state; False means one or more // objects are not at the desired state; Unknown is the initial state, before // the first reconciliation has evaluated the revision. // - True with reason ProbesSucceeded: the revision has rolled out and all objects pass their readiness probes. // - False with reason ProbeFailure: one or more objects are failing their readiness probes during rollout. - // - False with reason RollingOut: the revision is actively rolling out and has not yet become available. + // - False with reason RollingOut: the revision is actively rolling out and has not yet become ready. // - False with reason Blocked: the revision has encountered an error that requires manual intervention for recovery. // - False with reason ProgressDeadlineExceeded: the revision did not roll out within spec.progressDeadlineMinutes. // - False with reason Reconciling: the revision encountered an error that prevented it from observing the probes. @@ -560,7 +560,7 @@ type ObservedPhase struct { // +kubebuilder:object:root=true // +kubebuilder:resource:scope=Cluster // +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Available",type=string,JSONPath=`.status.conditions[?(@.type=='Available')].status` +// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=='Ready')].status` // +kubebuilder:printcolumn:name=Age,type=date,JSONPath=`.metadata.creationTimestamp` // ClusterObjectSet represents an immutable snapshot of Kubernetes objects diff --git a/api/v1/common_types.go b/api/v1/common_types.go index 53215dbdee..5660023003 100644 --- a/api/v1/common_types.go +++ b/api/v1/common_types.go @@ -19,6 +19,10 @@ package v1 const ( TypeInstalled = "Installed" TypeProgressing = "Progressing" + // TypeAvailable is the ClusterExtension condition that surfaces the health of the + // full set of managed objects across all active revisions. This condition may flap + // during upgrades and configuration changes. + TypeAvailable = "Available" // Installed reasons ReasonAbsent = "Absent" diff --git a/applyconfigurations/api/v1/clusterobjectsetstatus.go b/applyconfigurations/api/v1/clusterobjectsetstatus.go index 51a13c04ab..399f0aa560 100644 --- a/applyconfigurations/api/v1/clusterobjectsetstatus.go +++ b/applyconfigurations/api/v1/clusterobjectsetstatus.go @@ -34,13 +34,13 @@ type ClusterObjectSetStatusApplyConfiguration struct { // conditions is an optional list of status conditions describing the state of the // ClusterObjectSet. // - // The Available condition represents the state of the revision. + // The Ready condition represents the state of the revision. // True means all objects are at the desired state; False means one or more // objects are not at the desired state; Unknown is the initial state, before // the first reconciliation has evaluated the revision. // - True with reason ProbesSucceeded: the revision has rolled out and all objects pass their readiness probes. // - False with reason ProbeFailure: one or more objects are failing their readiness probes during rollout. - // - False with reason RollingOut: the revision is actively rolling out and has not yet become available. + // - False with reason RollingOut: the revision is actively rolling out and has not yet become ready. // - False with reason Blocked: the revision has encountered an error that requires manual intervention for recovery. // - False with reason ProgressDeadlineExceeded: the revision did not roll out within spec.progressDeadlineMinutes. // - False with reason Reconciling: the revision encountered an error that prevented it from observing the probes. diff --git a/cmd/object-controller/main_test.go b/cmd/object-controller/main_test.go index eb857abf73..2b93778b45 100644 --- a/cmd/object-controller/main_test.go +++ b/cmd/object-controller/main_test.go @@ -127,7 +127,7 @@ func TestStandaloneController(t *testing.T) { return } assert.False(collect, cos.Status.CompletedAt.IsZero(), "completedAt should be set after rollout; conditions: %v", cos.Status.Conditions) - available := meta.FindStatusCondition(cos.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + available := meta.FindStatusCondition(cos.Status.Conditions, ocv1.ClusterObjectSetTypeReady) if assert.NotNil(collect, available) { assert.Equal(collect, metav1.ConditionTrue, available.Status) assert.Equal(collect, ocv1.ClusterObjectSetReasonProbesSucceeded, available.Reason) diff --git a/helm/olmv1/base/object-controller/crd/experimental/olm.operatorframework.io_clusterobjectsets.yaml b/helm/olmv1/base/object-controller/crd/experimental/olm.operatorframework.io_clusterobjectsets.yaml index 58eae5b035..ef25e8118c 100644 --- a/helm/olmv1/base/object-controller/crd/experimental/olm.operatorframework.io_clusterobjectsets.yaml +++ b/helm/olmv1/base/object-controller/crd/experimental/olm.operatorframework.io_clusterobjectsets.yaml @@ -16,8 +16,8 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Available')].status - name: Available + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: Ready type: string - jsonPath: .metadata.creationTimestamp name: Age @@ -554,13 +554,13 @@ spec: conditions is an optional list of status conditions describing the state of the ClusterObjectSet. - The Available condition represents the state of the revision. + The Ready condition represents the state of the revision. True means all objects are at the desired state; False means one or more objects are not at the desired state; Unknown is the initial state, before the first reconciliation has evaluated the revision. - True with reason ProbesSucceeded: the revision has rolled out and all objects pass their readiness probes. - False with reason ProbeFailure: one or more objects are failing their readiness probes during rollout. - - False with reason RollingOut: the revision is actively rolling out and has not yet become available. + - False with reason RollingOut: the revision is actively rolling out and has not yet become ready. - False with reason Blocked: the revision has encountered an error that requires manual intervention for recovery. - False with reason ProgressDeadlineExceeded: the revision did not roll out within spec.progressDeadlineMinutes. - False with reason Reconciling: the revision encountered an error that prevented it from observing the probes. diff --git a/internal/object-controller/controllers/clusterobjectset_controller.go b/internal/object-controller/controllers/clusterobjectset_controller.go index a632e4aa9c..ba2a9c140d 100644 --- a/internal/object-controller/controllers/clusterobjectset_controller.go +++ b/internal/object-controller/controllers/clusterobjectset_controller.go @@ -662,7 +662,7 @@ func setAvailableWithDeadline(cos *ocv1.ClusterObjectSet, status metav1.Conditio return } meta.SetStatusCondition(&cos.Status.Conditions, metav1.Condition{ - Type: ocv1.ClusterObjectSetTypeAvailable, + Type: ocv1.ClusterObjectSetTypeReady, Status: status, Reason: reason, Message: message, @@ -676,7 +676,7 @@ func setRetryingConditions(cos *ocv1.ClusterObjectSet, message string, isDeadlin func markAsAvailable(cos *ocv1.ClusterObjectSet, reason, message string) bool { return meta.SetStatusCondition(&cos.Status.Conditions, metav1.Condition{ - Type: ocv1.ClusterObjectSetTypeAvailable, + Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionTrue, Reason: reason, Message: message, @@ -686,7 +686,7 @@ func markAsAvailable(cos *ocv1.ClusterObjectSet, reason, message string) bool { func markAsUnavailable(cos *ocv1.ClusterObjectSet, reason, message string) bool { return meta.SetStatusCondition(&cos.Status.Conditions, metav1.Condition{ - Type: ocv1.ClusterObjectSetTypeAvailable, + Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionFalse, Reason: reason, Message: message, diff --git a/internal/object-controller/controllers/clusterobjectset_controller_test.go b/internal/object-controller/controllers/clusterobjectset_controller_test.go index c11be9df4f..5c5a3f659d 100644 --- a/internal/object-controller/controllers/clusterobjectset_controller_test.go +++ b/internal/object-controller/controllers/clusterobjectset_controller_test.go @@ -83,7 +83,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_RevisionReconciliation(t *testing Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cond) require.Equal(t, metav1.ConditionFalse, cond.Status) require.Equal(t, ocv1.ClusterObjectSetReasonReconciling, cond.Reason) @@ -100,7 +100,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_RevisionReconciliation(t *testing ext := newTestClusterExtension() rev1 := newTestClusterObjectSet(t, clusterObjectSetName, ext, testScheme) meta.SetStatusCondition(&rev1.Status.Conditions, metav1.Condition{ - Type: ocv1.ClusterObjectSetTypeAvailable, + Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionTrue, Reason: ocv1.ClusterObjectSetReasonProbesSucceeded, Message: "Revision 1 is rolled out.", @@ -114,7 +114,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_RevisionReconciliation(t *testing Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cond) require.Equal(t, metav1.ConditionFalse, cond.Status) require.Equal(t, ocv1.ClusterObjectSetReasonReconciling, cond.Reason) @@ -139,7 +139,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_RevisionReconciliation(t *testing Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cond) require.Equal(t, metav1.ConditionFalse, cond.Status) require.Equal(t, ocv1.ClusterObjectSetReasonReconciling, cond.Reason) @@ -161,7 +161,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_RevisionReconciliation(t *testing Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cond) require.Equal(t, metav1.ConditionFalse, cond.Status) require.Equal(t, ocv1.ReasonRollingOut, cond.Reason) @@ -249,7 +249,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_RevisionReconciliation(t *testing Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cond) require.Equal(t, metav1.ConditionFalse, cond.Status) require.Equal(t, ocv1.ClusterObjectSetReasonProbeFailure, cond.Reason) @@ -337,7 +337,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_RevisionReconciliation(t *testing Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cond) require.Equal(t, metav1.ConditionFalse, cond.Status) require.Equal(t, ocv1.ClusterObjectSetReasonProbeFailure, cond.Reason) @@ -362,7 +362,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_RevisionReconciliation(t *testing Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cond) require.Equal(t, metav1.ConditionFalse, cond.Status) require.Equal(t, ocv1.ReasonRollingOut, cond.Reason) @@ -387,7 +387,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_RevisionReconciliation(t *testing Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cond) require.Equal(t, metav1.ConditionTrue, cond.Status) require.Equal(t, ocv1.ClusterObjectSetReasonProbesSucceeded, cond.Reason) @@ -750,7 +750,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_ArchivalAndDeletion(t *testing.T) Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cond) require.Equal(t, metav1.ConditionFalse, cond.Status) require.Equal(t, ocv1.ClusterObjectSetReasonReconciling, cond.Reason) @@ -785,7 +785,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_ArchivalAndDeletion(t *testing.T) Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cond) require.Equal(t, metav1.ConditionFalse, cond.Status) require.Equal(t, ocv1.ClusterObjectSetReasonArchived, cond.Reason) @@ -819,7 +819,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_ArchivalAndDeletion(t *testing.T) Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cond) require.Equal(t, metav1.ConditionFalse, cond.Status) require.Equal(t, ocv1.ClusterObjectSetReasonReconciling, cond.Reason) @@ -853,7 +853,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_ArchivalAndDeletion(t *testing.T) Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cond) require.Equal(t, metav1.ConditionFalse, cond.Status) require.Equal(t, ocv1.ClusterObjectSetReasonReconciling, cond.Reason) @@ -886,7 +886,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_ArchivalAndDeletion(t *testing.T) Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cond) require.Equal(t, metav1.ConditionFalse, cond.Status) require.Equal(t, ocv1.ClusterObjectSetReasonReconciling, cond.Reason) @@ -907,7 +907,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_ArchivalAndDeletion(t *testing.T) } rev1.Spec.LifecycleState = ocv1.ClusterObjectSetLifecycleStateArchived meta.SetStatusCondition(&rev1.Status.Conditions, metav1.Condition{ - Type: ocv1.ClusterObjectSetTypeAvailable, + Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionFalse, Reason: ocv1.ClusterObjectSetReasonArchived, Message: "revision is archived", @@ -1012,7 +1012,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_ProgressDeadline(t *testing.T) { Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cnd := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cnd := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.Equal(t, metav1.ConditionFalse, cnd.Status) require.Equal(t, ocv1.ReasonProgressDeadlineExceeded, cnd.Reason) }, @@ -1066,7 +1066,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_ProgressDeadline(t *testing.T) { Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cnd := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cnd := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cnd) require.Equal(t, metav1.ConditionFalse, cnd.Status) require.Equal(t, ocv1.ReasonProgressDeadlineExceeded, cnd.Reason) @@ -1096,7 +1096,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_ProgressDeadline(t *testing.T) { Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cnd := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cnd := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.Equal(t, metav1.ConditionFalse, cnd.Status) require.Equal(t, ocv1.ReasonRollingOut, cnd.Reason) }, @@ -1109,7 +1109,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_ProgressDeadline(t *testing.T) { rev1.Spec.ProgressDeadlineMinutes = 1 rev1.CreationTimestamp = metav1.NewTime(time.Date(2022, 1, 1, 0, 0, 0, 0, time.UTC)) meta.SetStatusCondition(&rev1.Status.Conditions, metav1.Condition{ - Type: ocv1.ClusterObjectSetTypeAvailable, + Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionFalse, Reason: ocv1.ReasonProgressDeadlineExceeded, Message: "Revision has not rolled out for 1 minute(s). Last status: Revision 1 is rolling out.", @@ -1127,7 +1127,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_ProgressDeadline(t *testing.T) { Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cnd := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cnd := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cnd) require.Equal(t, metav1.ConditionTrue, cnd.Status) require.Equal(t, ocv1.ClusterObjectSetReasonProbesSucceeded, cnd.Reason) @@ -1142,7 +1142,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_ProgressDeadline(t *testing.T) { rev1.Spec.ProgressDeadlineMinutes = 1 rev1.CreationTimestamp = metav1.NewTime(time.Now().Add(-2 * time.Minute)) meta.SetStatusCondition(&rev1.Status.Conditions, metav1.Condition{ - Type: ocv1.ClusterObjectSetTypeAvailable, + Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionTrue, Reason: ocv1.ClusterObjectSetReasonProbesSucceeded, ObservedGeneration: rev1.Generation, @@ -1159,7 +1159,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_ProgressDeadline(t *testing.T) { Name: clusterObjectSetName, }, rev) require.NoError(t, err) - cnd := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cnd := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.Equal(t, metav1.ConditionFalse, cnd.Status) require.Equal(t, ocv1.ReasonRollingOut, cnd.Reason) }, @@ -1623,7 +1623,7 @@ func Test_ClusterObjectSetReconciler_Reconcile_ForeignRevisionCollision(t *testi rev := &ocv1.ClusterObjectSet{} require.NoError(t, testClient.Get(t.Context(), client.ObjectKey{Name: tc.reconcilingRevisionName}, rev)) - cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeAvailable) + cond := meta.FindStatusCondition(rev.Status.Conditions, ocv1.ClusterObjectSetTypeReady) require.NotNil(t, cond) require.Equal(t, metav1.ConditionFalse, cond.Status) require.Equal(t, ocv1.ClusterObjectSetReasonReconciling, cond.Reason) diff --git a/internal/operator-controller/conditionsets/conditionsets.go b/internal/operator-controller/conditionsets/conditionsets.go index 97073a02d8..3a750ded63 100644 --- a/internal/operator-controller/conditionsets/conditionsets.go +++ b/internal/operator-controller/conditionsets/conditionsets.go @@ -31,6 +31,7 @@ var ConditionTypes = []string{ ocv1.TypeChannelDeprecated, ocv1.TypeBundleDeprecated, ocv1.TypeProgressing, + ocv1.TypeAvailable, } var ConditionReasons = []string{ diff --git a/internal/operator-controller/controllers/clusterextension_controller.go b/internal/operator-controller/controllers/clusterextension_controller.go index 4bbb48506c..70e6d6f572 100644 --- a/internal/operator-controller/controllers/clusterextension_controller.go +++ b/internal/operator-controller/controllers/clusterextension_controller.go @@ -174,11 +174,13 @@ func (r *ClusterExtensionReconciler) Reconcile(ctx context.Context, req ctrl.Req // ensureFailureConditionsWithReason keeps every non-deprecation condition present. // If one is missing, we add it with the given reason and message so users see why // reconcile failed. Deprecation conditions are handled later by SetDeprecationStatus. +// The Available condition is handled separately through the ApplyBundleWithBoxcutter reconciliation step when +// the BoxcutterRuntime feature gate is turned on. // //nolint:unparam // reason parameter is designed to be flexible, even if current callers use the same value func ensureFailureConditionsWithReason(ext *ocv1.ClusterExtension, reason v1alpha1.ConditionReason, message string) { for _, condType := range conditionsets.ConditionTypes { - if isDeprecationCondition(condType) { + if isDeprecationCondition(condType) || condType == ocv1.TypeAvailable { continue } cond := apimeta.FindStatusCondition(ext.Status.Conditions, condType) diff --git a/internal/operator-controller/controllers/common_controller.go b/internal/operator-controller/controllers/common_controller.go index 4c3c77b803..d7a1d9c9ed 100644 --- a/internal/operator-controller/controllers/common_controller.go +++ b/internal/operator-controller/controllers/common_controller.go @@ -77,9 +77,10 @@ func setActiveRevisionsFromRevisionStates(ext *ocv1.ClusterExtension, revisionSt } for _, r := range revisionStates.RollingOut { rs := ocv1.RevisionStatus{Name: r.RevisionName} - avail := apimeta.FindStatusCondition(r.Conditions, ocv1.ClusterObjectSetTypeAvailable) + avail := apimeta.FindStatusCondition(r.Conditions, ocv1.ClusterObjectSetTypeReady) if avail != nil { a := *avail + a.Type = ocv1.TypeAvailable a.ObservedGeneration = ext.GetGeneration() apimeta.SetStatusCondition(&rs.Conditions, a) } @@ -90,9 +91,10 @@ func setActiveRevisionsFromRevisionStates(ext *ocv1.ClusterExtension, revisionSt // setAvailableFromRevisionStates sets the Available status condition based on the given revision states func setAvailableFromRevisionStates(ext *ocv1.ClusterExtension, revisionStates *RevisionStates) { if i := revisionStates.Installed; i != nil { - avail := apimeta.FindStatusCondition(i.Conditions, ocv1.ClusterObjectSetTypeAvailable) + avail := apimeta.FindStatusCondition(i.Conditions, ocv1.ClusterObjectSetTypeReady) if avail != nil { a := *avail + a.Type = ocv1.TypeAvailable a.ObservedGeneration = ext.GetGeneration() apimeta.SetStatusCondition(&ext.Status.Conditions, a) } @@ -109,10 +111,10 @@ func setAvailableFromRevisionStates(ext *ocv1.ClusterExtension, revisionStates * func setProgressingFromRevisionStates(ext *ocv1.ClusterExtension, revisionStates *RevisionStates) { if len(revisionStates.RollingOut) > 0 { revisionMeta := revisionStates.RollingOut[len(revisionStates.RollingOut)-1] - avail := apimeta.FindStatusCondition(revisionMeta.Conditions, ocv1.ClusterObjectSetTypeAvailable) + avail := apimeta.FindStatusCondition(revisionMeta.Conditions, ocv1.ClusterObjectSetTypeReady) setProgressingFromAvailable(ext, avail, false) } else if revisionStates.Installed != nil { - setProgressingFromAvailable(ext, apimeta.FindStatusCondition(revisionStates.Installed.Conditions, ocv1.ClusterObjectSetTypeAvailable), true) + setProgressingFromAvailable(ext, apimeta.FindStatusCondition(revisionStates.Installed.Conditions, ocv1.ClusterObjectSetTypeReady), true) } } @@ -149,7 +151,7 @@ func determineFailureReason(rollingRevisions []*RevisionMetadata) string { } // Latest revision is the last element (sorted ascending by Spec.Revision). latestRevision := rollingRevisions[len(rollingRevisions)-1] - availableCond := apimeta.FindStatusCondition(latestRevision.Conditions, ocv1.ClusterObjectSetTypeAvailable) + availableCond := apimeta.FindStatusCondition(latestRevision.Conditions, ocv1.ClusterObjectSetTypeReady) // Reconciling is the new home of the old Retrying signal: it indicates an error occurred. if availableCond != nil && availableCond.Reason == ocv1.ClusterObjectSetReasonReconciling { return ocv1.ReasonFailed diff --git a/internal/operator-controller/controllers/common_controller_test.go b/internal/operator-controller/controllers/common_controller_test.go index a5cb360943..43ba39ac7f 100644 --- a/internal/operator-controller/controllers/common_controller_test.go +++ b/internal/operator-controller/controllers/common_controller_test.go @@ -325,7 +325,7 @@ func TestSetInstalledStatusFromRevisionStates_ConfigValidationError(t *testing.T RevisionName: "rev-1", Conditions: []metav1.Condition{ { - Type: ocv1.ClusterObjectSetTypeAvailable, + Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionUnknown, Reason: ocv1.ClusterObjectSetReasonReconciling, Message: "some error occurred", @@ -349,7 +349,7 @@ func TestSetInstalledStatusFromRevisionStates_ConfigValidationError(t *testing.T RevisionName: "rev-1", Conditions: []metav1.Condition{ { - Type: ocv1.ClusterObjectSetTypeAvailable, + Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionFalse, Reason: ocv1.ReasonRollingOut, Message: "Revision is rolling out", @@ -360,7 +360,7 @@ func TestSetInstalledStatusFromRevisionStates_ConfigValidationError(t *testing.T RevisionName: "rev-2", Conditions: []metav1.Condition{ { - Type: ocv1.ClusterObjectSetTypeAvailable, + Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionUnknown, Reason: ocv1.ClusterObjectSetReasonReconciling, Message: "validation error occurred", @@ -384,7 +384,7 @@ func TestSetInstalledStatusFromRevisionStates_ConfigValidationError(t *testing.T RevisionName: "rev-1", Conditions: []metav1.Condition{ { - Type: ocv1.ClusterObjectSetTypeAvailable, + Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionFalse, Reason: ocv1.ReasonRollingOut, Message: "Revision is rolling out", @@ -408,7 +408,7 @@ func TestSetInstalledStatusFromRevisionStates_ConfigValidationError(t *testing.T RevisionName: "rev-1", Conditions: []metav1.Condition{ { - Type: ocv1.ClusterObjectSetTypeAvailable, + Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionUnknown, Reason: ocv1.ClusterObjectSetReasonReconciling, Message: "old error that was superseded", @@ -419,7 +419,7 @@ func TestSetInstalledStatusFromRevisionStates_ConfigValidationError(t *testing.T RevisionName: "rev-2", Conditions: []metav1.Condition{ { - Type: ocv1.ClusterObjectSetTypeAvailable, + Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionFalse, Reason: ocv1.ReasonRollingOut, Message: "Latest revision is rolling out healthy", @@ -457,7 +457,7 @@ func TestSetInstalledStatusFromRevisionStates_ConfigValidationError(t *testing.T func TestDetermineFailureReason(t *testing.T) { availCond := func(status metav1.ConditionStatus, reason string) []metav1.Condition { - return []metav1.Condition{{Type: ocv1.ClusterObjectSetTypeAvailable, Status: status, Reason: reason}} + return []metav1.Condition{{Type: ocv1.ClusterObjectSetTypeReady, Status: status, Reason: reason}} } for _, tc := range []struct { name string @@ -504,7 +504,7 @@ func TestProgressingFromAvailable(t *testing.T) { }{ { name: "completed revision maps to Succeeded", - available: &metav1.Condition{Type: ocv1.ClusterObjectSetTypeAvailable, Status: metav1.ConditionTrue, Reason: ocv1.ClusterObjectSetReasonProbesSucceeded, Message: "ok"}, + available: &metav1.Condition{Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionTrue, Reason: ocv1.ClusterObjectSetReasonProbesSucceeded, Message: "ok"}, completed: true, expected: metav1.Condition{Type: ocv1.TypeProgressing, Status: metav1.ConditionTrue, Reason: ocv1.ReasonSucceeded, Message: "Desired state reached"}, }, @@ -516,25 +516,25 @@ func TestProgressingFromAvailable(t *testing.T) { }, { name: "probe failure maps to RollingOut", - available: &metav1.Condition{Type: ocv1.ClusterObjectSetTypeAvailable, Status: metav1.ConditionFalse, Reason: ocv1.ClusterObjectSetReasonProbeFailure, Message: "probe failed"}, + available: &metav1.Condition{Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionFalse, Reason: ocv1.ClusterObjectSetReasonProbeFailure, Message: "probe failed"}, completed: false, expected: metav1.Condition{Type: ocv1.TypeProgressing, Status: metav1.ConditionTrue, Reason: ocv1.ReasonRollingOut, Message: "probe failed"}, }, { name: "reconciling maps to Retrying", - available: &metav1.Condition{Type: ocv1.ClusterObjectSetTypeAvailable, Status: metav1.ConditionUnknown, Reason: ocv1.ClusterObjectSetReasonReconciling, Message: "boom"}, + available: &metav1.Condition{Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionUnknown, Reason: ocv1.ClusterObjectSetReasonReconciling, Message: "boom"}, completed: false, expected: metav1.Condition{Type: ocv1.TypeProgressing, Status: metav1.ConditionTrue, Reason: ocv1.ReasonRetrying, Message: "boom"}, }, { name: "blocked maps to Blocked", - available: &metav1.Condition{Type: ocv1.ClusterObjectSetTypeAvailable, Status: metav1.ConditionFalse, Reason: ocv1.ClusterObjectSetReasonBlocked, Message: "manual fix needed"}, + available: &metav1.Condition{Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionFalse, Reason: ocv1.ClusterObjectSetReasonBlocked, Message: "manual fix needed"}, completed: false, expected: metav1.Condition{Type: ocv1.TypeProgressing, Status: metav1.ConditionFalse, Reason: ocv1.ReasonBlocked, Message: "manual fix needed"}, }, { name: "deadline exceeded maps to ProgressDeadlineExceeded", - available: &metav1.Condition{Type: ocv1.ClusterObjectSetTypeAvailable, Status: metav1.ConditionFalse, Reason: ocv1.ReasonProgressDeadlineExceeded, Message: "too slow"}, + available: &metav1.Condition{Type: ocv1.ClusterObjectSetTypeReady, Status: metav1.ConditionFalse, Reason: ocv1.ReasonProgressDeadlineExceeded, Message: "too slow"}, completed: false, expected: metav1.Condition{Type: ocv1.TypeProgressing, Status: metav1.ConditionFalse, Reason: ocv1.ReasonProgressDeadlineExceeded, Message: "too slow"}, }, @@ -548,3 +548,79 @@ func TestProgressingFromAvailable(t *testing.T) { }) } } + +func TestSetAvailableFromRevisionStates(t *testing.T) { + for _, tc := range []struct { + name string + revisionStates *RevisionStates + // expectAvailable, when non-nil, is the Available condition expected on the ClusterExtension. + // When nil, the ClusterExtension must not surface an Available condition at all. + expectAvailable *metav1.Condition + }{ + { + name: "installed revision with Ready=True is remapped to Available=True", + revisionStates: &RevisionStates{ + Installed: &RevisionMetadata{ + RevisionName: "rev-1", + Conditions: []metav1.Condition{{ + Type: ocv1.ClusterObjectSetTypeReady, + Status: metav1.ConditionTrue, + Reason: ocv1.ClusterObjectSetReasonProbesSucceeded, + Message: "Revision 1 is rolled out.", + }}, + }, + }, + expectAvailable: &metav1.Condition{ + Status: metav1.ConditionTrue, + Reason: ocv1.ClusterObjectSetReasonProbesSucceeded, + Message: "Revision 1 is rolled out.", + }, + }, + { + name: "installed revision with Ready=False carries status, reason and message through", + revisionStates: &RevisionStates{ + Installed: &RevisionMetadata{ + RevisionName: "rev-1", + Conditions: []metav1.Condition{{ + Type: ocv1.ClusterObjectSetTypeReady, + Status: metav1.ConditionFalse, + Reason: ocv1.ClusterObjectSetReasonProbeFailure, + Message: "probe failed", + }}, + }, + }, + expectAvailable: &metav1.Condition{ + Status: metav1.ConditionFalse, + Reason: ocv1.ClusterObjectSetReasonProbeFailure, + Message: "probe failed", + }, + }, + { + name: "no installed revision sets no Available condition", + revisionStates: &RevisionStates{}, + expectAvailable: nil, + }, + } { + t.Run(tc.name, func(t *testing.T) { + ext := &ocv1.ClusterExtension{ObjectMeta: metav1.ObjectMeta{Name: "test-ext", Generation: 7}} + + setAvailableFromRevisionStates(ext, tc.revisionStates) + + // The ClusterExtension must never surface the ClusterObjectSet's own Ready condition type. + require.Nil(t, meta.FindStatusCondition(ext.Status.Conditions, ocv1.ClusterObjectSetTypeReady), + "CE must not expose the COS Ready condition type directly") + + got := meta.FindStatusCondition(ext.Status.Conditions, ocv1.TypeAvailable) + if tc.expectAvailable == nil { + require.Nil(t, got, "CE must not expose an Available condition") + return + } + require.NotNil(t, got, "CE must expose an Available condition") + require.Equal(t, tc.expectAvailable.Status, got.Status) + require.Equal(t, tc.expectAvailable.Reason, got.Reason) + require.Equal(t, tc.expectAvailable.Message, got.Message) + require.Equal(t, ext.GetGeneration(), got.ObservedGeneration, + "Available condition should observe the ClusterExtension generation") + }) + } +} diff --git a/manifests/experimental-e2e.yaml b/manifests/experimental-e2e.yaml index 08af42c6df..a108b79dfe 100644 --- a/manifests/experimental-e2e.yaml +++ b/manifests/experimental-e2e.yaml @@ -1372,8 +1372,8 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Available')].status - name: Available + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: Ready type: string - jsonPath: .metadata.creationTimestamp name: Age @@ -1910,13 +1910,13 @@ spec: conditions is an optional list of status conditions describing the state of the ClusterObjectSet. - The Available condition represents the state of the revision. + The Ready condition represents the state of the revision. True means all objects are at the desired state; False means one or more objects are not at the desired state; Unknown is the initial state, before the first reconciliation has evaluated the revision. - True with reason ProbesSucceeded: the revision has rolled out and all objects pass their readiness probes. - False with reason ProbeFailure: one or more objects are failing their readiness probes during rollout. - - False with reason RollingOut: the revision is actively rolling out and has not yet become available. + - False with reason RollingOut: the revision is actively rolling out and has not yet become ready. - False with reason Blocked: the revision has encountered an error that requires manual intervention for recovery. - False with reason ProgressDeadlineExceeded: the revision did not roll out within spec.progressDeadlineMinutes. - False with reason Reconciling: the revision encountered an error that prevented it from observing the probes. diff --git a/manifests/experimental.yaml b/manifests/experimental.yaml index 0b780ffe28..d14d216f2a 100644 --- a/manifests/experimental.yaml +++ b/manifests/experimental.yaml @@ -1333,8 +1333,8 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Available')].status - name: Available + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: Ready type: string - jsonPath: .metadata.creationTimestamp name: Age @@ -1871,13 +1871,13 @@ spec: conditions is an optional list of status conditions describing the state of the ClusterObjectSet. - The Available condition represents the state of the revision. + The Ready condition represents the state of the revision. True means all objects are at the desired state; False means one or more objects are not at the desired state; Unknown is the initial state, before the first reconciliation has evaluated the revision. - True with reason ProbesSucceeded: the revision has rolled out and all objects pass their readiness probes. - False with reason ProbeFailure: one or more objects are failing their readiness probes during rollout. - - False with reason RollingOut: the revision is actively rolling out and has not yet become available. + - False with reason RollingOut: the revision is actively rolling out and has not yet become ready. - False with reason Blocked: the revision has encountered an error that requires manual intervention for recovery. - False with reason ProgressDeadlineExceeded: the revision did not roll out within spec.progressDeadlineMinutes. - False with reason Reconciling: the revision encountered an error that prevented it from observing the probes. diff --git a/test/e2e/features/install.feature b/test/e2e/features/install.feature index f62191b9f9..3ae8b98ccc 100644 --- a/test/e2e/features/install.feature +++ b/test/e2e/features/install.feature @@ -370,7 +370,7 @@ Feature: Install ClusterExtension matchLabels: "olm.operatorframework.io/metadata.name": ${CATALOG:test} """ - Then ClusterObjectSet "${NAME}-1" reports Available as False with Reason ProgressDeadlineExceeded + Then ClusterObjectSet "${NAME}-1" reports Ready as False with Reason ProgressDeadlineExceeded And ClusterExtension reports Progressing as False with Reason ProgressDeadlineExceeded and Message: """ Revision has not rolled out for 1 minute(s). Last status: Revision 1 is rolling out. @@ -404,7 +404,7 @@ Feature: Install ClusterExtension matchLabels: "olm.operatorframework.io/metadata.name": ${CATALOG:test} """ - Then ClusterObjectSet "${NAME}-1" reports Available as False with Reason ProgressDeadlineExceeded + Then ClusterObjectSet "${NAME}-1" reports Ready as False with Reason ProgressDeadlineExceeded And ClusterExtension reports Progressing as False with Reason ProgressDeadlineExceeded and Message: """ Revision has not rolled out for 1 minute(s). Last status: Revision 1 is rolling out. diff --git a/test/e2e/features/revision.feature b/test/e2e/features/revision.feature index cd44d8b168..9dbed030b5 100644 --- a/test/e2e/features/revision.feature +++ b/test/e2e/features/revision.feature @@ -60,7 +60,7 @@ Feature: Install ClusterObjectSet """ Then resource "persistentvolumeclaim/test-pvc" is installed - And ClusterObjectSet "${COS_NAME}" reports Available as False with Reason ProbeFailure and Message: + And ClusterObjectSet "${COS_NAME}" reports Ready as False with Reason ProbeFailure and Message: """ Object PersistentVolumeClaim.v1 ${TEST_NAMESPACE}/test-pvc: value at key "status.phase" != "Bound"; expected: "Bound" got: "Pending" """ @@ -147,7 +147,7 @@ Feature: Install ClusterObjectSet revision: 1 """ - Then ClusterObjectSet "${COS_NAME}" reports Available as True with Reason ProbesSucceeded + Then ClusterObjectSet "${COS_NAME}" reports Ready as True with Reason ProbesSucceeded And resource "persistentvolume/test-pv" is installed And resource "persistentvolumeclaim/test-pvc" is installed And resource "configmap/test-configmap" is installed @@ -204,7 +204,7 @@ Feature: Install ClusterObjectSet """ Then resource "configmap/test-configmap-1" is installed - And ClusterObjectSet "${COS_NAME}" reports Available as False with Reason ProbeFailure and Message: + And ClusterObjectSet "${COS_NAME}" reports Ready as False with Reason ProbeFailure and Message: """ Object ConfigMap.v1 ${TEST_NAMESPACE}/test-configmap-1: value at key "data.foo" != "bar"; expected: "bar" got: "foo" """ @@ -322,7 +322,7 @@ Feature: Install ClusterObjectSet And resource "serviceaccount/test-serviceaccount" is installed And resource "pod/test-pod" is installed And resource "configmap/test-configmap-3" is installed - And ClusterObjectSet "${COS_NAME}" reports Available as True with Reason ProbesSucceeded + And ClusterObjectSet "${COS_NAME}" reports Ready as True with Reason ProbesSucceeded Scenario: User can install a ClusterObjectSet with objects stored in Secrets Given namespace "${TEST_NAMESPACE}" is available @@ -418,7 +418,7 @@ Feature: Install ClusterObjectSet key: deployment revision: 1 """ - Then ClusterObjectSet "${COS_NAME}" reports Available as True with Reason ProbesSucceeded + Then ClusterObjectSet "${COS_NAME}" reports Ready as True with Reason ProbesSucceeded And resource "configmap/test-configmap-ref" is installed And resource "deployment/test-httpd" is installed And ClusterObjectSet "${COS_NAME}" has observed phase "resources" with a non-empty digest @@ -465,7 +465,7 @@ Feature: Install ClusterObjectSet key: configmap revision: 1 """ - Then ClusterObjectSet "${COS_NAME}" reports Available as False with Reason Blocked and Message: + Then ClusterObjectSet "${COS_NAME}" reports Ready as False with Reason Blocked and Message: """ the following secrets are not immutable (referenced secrets must have immutable set to true): ${TEST_NAMESPACE}/${COS_NAME}-mutable-secret """ @@ -513,7 +513,7 @@ Feature: Install ClusterObjectSet key: configmap revision: 1 """ - Then ClusterObjectSet "${COS_NAME}" reports Available as True with Reason ProbesSucceeded + Then ClusterObjectSet "${COS_NAME}" reports Ready as True with Reason ProbesSucceeded And ClusterObjectSet "${COS_NAME}" has observed phase "resources" with a non-empty digest # Delete the immutable Secret and recreate with different content When resource "secret/${COS_NAME}-change-secret" is removed @@ -541,7 +541,7 @@ Feature: Install ClusterObjectSet } """ And ClusterObjectSet "${COS_NAME}" reconciliation is triggered - Then ClusterObjectSet "${COS_NAME}" reports Available as False with Reason Blocked and Message includes: + Then ClusterObjectSet "${COS_NAME}" reports Ready as False with Reason Blocked and Message includes: """ resolved content of 1 phase(s) has changed: phase "resources" """ @@ -571,7 +571,7 @@ Feature: Install ClusterObjectSet } """ And ClusterObjectSet "${COS_NAME}" reconciliation is triggered - Then ClusterObjectSet "${COS_NAME}" reports Available as True with Reason ProbesSucceeded + Then ClusterObjectSet "${COS_NAME}" reports Ready as True with Reason ProbesSucceeded @ProgressDeadline @@ -633,7 +633,7 @@ Feature: Install ClusterObjectSet """ Then resource "configmap/test-configmap" is installed And resource "deployment/test-deployment" is installed - And ClusterObjectSet "${COS_NAME}" reports Available as False with Reason ProgressDeadlineExceeded + And ClusterObjectSet "${COS_NAME}" reports Ready as False with Reason ProgressDeadlineExceeded When ClusterObjectSet "${COS_NAME}" lifecycle is set to "Archived" Then ClusterObjectSet "${COS_NAME}" is archived And resource "configmap/test-configmap" is eventually not found @@ -702,5 +702,5 @@ Feature: Install ClusterObjectSet type: RuntimeDefault revision: 1 """ - Then ClusterObjectSet "${COS_NAME}" reports Available as False with Reason ProgressDeadlineExceeded - And ClusterObjectSet "${COS_NAME}" reports Available as True with Reason ProbesSucceeded + Then ClusterObjectSet "${COS_NAME}" reports Ready as False with Reason ProgressDeadlineExceeded + And ClusterObjectSet "${COS_NAME}" reports Ready as True with Reason ProbesSucceeded diff --git a/test/e2e/features/status.feature b/test/e2e/features/status.feature index 23acf2a196..7c88f73380 100644 --- a/test/e2e/features/status.feature +++ b/test/e2e/features/status.feature @@ -34,13 +34,13 @@ Feature: Report status of the managed ClusterExtension workload Scenario: Report availability change when managed workload is not ready When deployment "test-operator-${SCENARIO_ID}" reports as not ready Then ClusterExtension reports Available as False with Reason ProbeFailure - And ClusterObjectSet "${NAME}-1" reports Available as False with Reason ProbeFailure + And ClusterObjectSet "${NAME}-1" reports Ready as False with Reason ProbeFailure @BoxcutterRuntime Scenario: Report availability change when managed workload restores its readiness Given deployment "test-operator-${SCENARIO_ID}" reports as not ready And ClusterExtension reports Available as False with Reason ProbeFailure - And ClusterObjectSet "${NAME}-1" reports Available as False with Reason ProbeFailure + And ClusterObjectSet "${NAME}-1" reports Ready as False with Reason ProbeFailure When deployment "test-operator-${SCENARIO_ID}" reports as ready Then ClusterExtension is available - And ClusterObjectSet "${NAME}-1" reports Available as True with Reason ProbesSucceeded + And ClusterObjectSet "${NAME}-1" reports Ready as True with Reason ProbesSucceeded diff --git a/test/e2e/features/update.feature b/test/e2e/features/update.feature index 40edd84274..74357aa201 100644 --- a/test/e2e/features/update.feature +++ b/test/e2e/features/update.feature @@ -315,7 +315,7 @@ Feature: Update ClusterExtension And ClusterExtension is rolled out And ClusterExtension is available And ClusterExtension reports "${NAME}-2" as active revision - And ClusterObjectSet "${NAME}-2" reports Available as True with Reason ProbesSucceeded + And ClusterObjectSet "${NAME}-2" reports Ready as True with Reason ProbesSucceeded And ClusterObjectSet "${NAME}-1" is archived And ClusterObjectSet "${NAME}-1" phase objects are not found or not owned by the revision @@ -343,7 +343,7 @@ Feature: Update ClusterExtension And ClusterExtension is available When ClusterExtension version is updated to "1.0.2" Then ClusterExtension reports "${NAME}-1, ${NAME}-2" as active revisions - And ClusterObjectSet "${NAME}-2" reports Available as False with Reason ProbeFailure + And ClusterObjectSet "${NAME}-2" reports Ready as False with Reason ProbeFailure Scenario: Clearing deprecated serviceAccount field is reconciled without warnings Given ClusterExtension is applied diff --git a/test/e2e/steps/steps.go b/test/e2e/steps/steps.go index 7495bbabcd..d5d5537b6e 100644 --- a/test/e2e/steps/steps.go +++ b/test/e2e/steps/steps.go @@ -972,10 +972,10 @@ func ClusterObjectSetHasObservedPhase(ctx context.Context, cosName, phaseName st return nil } -// ClusterObjectSetIsArchived waits for the named ClusterObjectSet to have Available=False +// ClusterObjectSetIsArchived waits for the named ClusterObjectSet to have Ready=False // with reason Archived. Polls with timeout. func ClusterObjectSetIsArchived(ctx context.Context, revisionName string) error { - return waitForCondition(ctx, "clusterobjectset", substituteScenarioVars(revisionName, scenarioCtx(ctx)), "Available", "False", ptr.To("Archived"), nil) + return waitForCondition(ctx, "clusterobjectset", substituteScenarioVars(revisionName, scenarioCtx(ctx)), "Ready", "False", ptr.To("Archived"), nil) } // ClusterObjectSetHasAnnotationWithValue waits for the named ClusterObjectSet to have the specified