Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions e2e/adapter/adapter_failover.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ var _ = ginkgo.Describe("[Suite: adapter-failures][negative] Adapter framework c
"initial cluster conditions should have Reconciled=False")

hasAvailableFalse := h.HasResourceCondition(cluster.Status.Conditions,
client.ConditionTypeAvailable, openapi.ResourceConditionStatusFalse)
client.ConditionTypeLastKnownReconciled, openapi.ResourceConditionStatusFalse)
g.Expect(hasAvailableFalse).To(BeTrue(),
"initial cluster conditions should have Available=False")
"initial cluster conditions should have LastKnownReconciled=False")
}, h.Cfg.Timeouts.Adapter.Processing, h.Cfg.Polling.Interval).Should(Succeed())

ginkgo.By("Verify adapter execution detects failure and reports error")
Expand Down
4 changes: 2 additions & 2 deletions e2e/cluster/adapter_failure.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ var _ = ginkgo.Describe("[Suite: cluster][negative] Cluster Can Reflect Adapter
"cluster Reconciled condition should remain False")

g.Expect(h.HasResourceCondition(cl.Status.Conditions,
client.ConditionTypeAvailable, openapi.ResourceConditionStatusFalse)).To(BeTrue(),
"cluster Available condition should remain False")
client.ConditionTypeLastKnownReconciled, openapi.ResourceConditionStatusFalse)).To(BeTrue(),
"cluster LastKnownReconciled condition should remain False")
}, h.Cfg.Polling.Interval*3, h.Cfg.Polling.Interval).Should(Succeed())

ginkgo.GinkgoWriter.Printf("Verified cluster top-level status: Reconciled=False, Available=False (reflecting adapter failure)\n")
Expand Down
4 changes: 2 additions & 2 deletions e2e/cluster/concurrent_creation.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ var _ = ginkgo.Describe("[Suite: cluster][concurrent] System can process concurr
Expect(err).NotTo(HaveOccurred(), "failed to get cluster %d (%s)", i, clusterID)

hasAvailable := h.HasResourceCondition(cluster.Status.Conditions,
client.ConditionTypeAvailable, openapi.ResourceConditionStatusTrue)
client.ConditionTypeLastKnownReconciled, openapi.ResourceConditionStatusTrue)
Expect(hasAvailable).To(BeTrue(),
"cluster %d (%s) should have Available=True", i, clusterID)
"cluster %d (%s) should have LastKnownReconciled=True", i, clusterID)

ginkgo.GinkgoWriter.Printf("Cluster %d (%s) reached Reconciled=True, Available=True\n", i, clusterID)
}
Expand Down
4 changes: 2 additions & 2 deletions e2e/cluster/crash_recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func verifyClusterReconciled(ctx context.Context, h *helper.Helper, clusterID st
"cluster Reconciled condition should transition to True")

g.Expect(h.HasResourceCondition(cl.Status.Conditions,
client.ConditionTypeAvailable, openapi.ResourceConditionStatusTrue)).To(BeTrue(),
"cluster Available condition should transition to True")
client.ConditionTypeLastKnownReconciled, openapi.ResourceConditionStatusTrue)).To(BeTrue(),
"cluster LastKnownReconciled condition should transition to True")
}, h.Cfg.Timeouts.Cluster.Reconciled, h.Cfg.Polling.Interval).Should(Succeed())
}
8 changes: 4 additions & 4 deletions e2e/cluster/creation.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ var _ = ginkgo.Describe("[Suite: cluster][baseline] Cluster Resource Type Lifecy
Expect(hasReconciled).To(BeTrue(), "cluster should have Reconciled=True condition")

hasAvailable := h.HasResourceCondition(finalCluster.Status.Conditions,
client.ConditionTypeAvailable, openapi.ResourceConditionStatusTrue)
Expect(hasAvailable).To(BeTrue(), "cluster should have Available=True condition")
client.ConditionTypeLastKnownReconciled, openapi.ResourceConditionStatusTrue)
Expect(hasAvailable).To(BeTrue(), "cluster should have LastKnownReconciled=True condition")

// Validate observedGeneration for Reconciled and Available conditions
// Validate observedGeneration for Reconciled and LastKnownReconciled conditions
for _, condition := range finalCluster.Status.Conditions {
if condition.Type == client.ConditionTypeReconciled || condition.Type == client.ConditionTypeAvailable {
if condition.Type == client.ConditionTypeReconciled || condition.Type == client.ConditionTypeLastKnownReconciled {
Expect(condition.ObservedGeneration).To(Equal(int32(1)),
"cluster condition %s should have observed_generation=1 for new creation request", condition.Type)
}
Expand Down
4 changes: 2 additions & 2 deletions e2e/cluster/update_edge_cases.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ var _ = ginkgo.Describe("[Suite: cluster][update] Labels-Only PATCH",
Eventually(h.PollClusterAdapterStatuses(ctx, clusterID), h.Cfg.Timeouts.Adapter.Processing, h.Cfg.Polling.Interval).
Should(helper.HaveAllAdaptersAtGeneration(h.Cfg.Adapters.Cluster, int32(2)))

ginkgo.By("verifying cluster reaches Reconciled=True and Available=True")
ginkgo.By("verifying cluster reaches Reconciled=True and LastKnownReconciled=True")
Eventually(h.PollCluster(ctx, clusterID), h.Cfg.Timeouts.Cluster.Reconciled, h.Cfg.Polling.Interval).
Should(helper.HaveResourceCondition(client.ConditionTypeReconciled, openapi.ResourceConditionStatusTrue))
Eventually(h.PollCluster(ctx, clusterID), h.Cfg.Timeouts.Cluster.Reconciled, h.Cfg.Polling.Interval).
Should(helper.HaveResourceCondition(client.ConditionTypeAvailable, openapi.ResourceConditionStatusTrue))
Should(helper.HaveResourceCondition(client.ConditionTypeLastKnownReconciled, openapi.ResourceConditionStatusTrue))

finalCluster, err := h.Client.GetCluster(ctx, clusterID)
Expect(err).NotTo(HaveOccurred())
Expand Down
4 changes: 2 additions & 2 deletions e2e/nodepool/concurrent_creation.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ var _ = ginkgo.Describe("[Suite: nodepool][concurrent] Multiple nodepools can co
Expect(err).NotTo(HaveOccurred(), "failed to get nodepool %d (%s)", i, npID)

hasAvailable := h.HasResourceCondition(np.Status.Conditions,
client.ConditionTypeAvailable, openapi.ResourceConditionStatusTrue)
client.ConditionTypeLastKnownReconciled, openapi.ResourceConditionStatusTrue)
Expect(hasAvailable).To(BeTrue(),
"nodepool %d (%s) should have Available=True", i, npID)
"nodepool %d (%s) should have LastKnownReconciled=True", i, npID)

ginkgo.GinkgoWriter.Printf("Nodepool %d (%s) reached Reconciled=True, Available=True\n", i, npID)
}
Expand Down
8 changes: 4 additions & 4 deletions e2e/nodepool/creation.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ var _ = ginkgo.Describe("[Suite: nodepool][baseline] NodePool Resource Type Life
Expect(hasReconciled).To(BeTrue(), "nodepool should have Reconciled=True condition")

hasAvailable := h.HasResourceCondition(finalNodePool.Status.Conditions,
client.ConditionTypeAvailable, openapi.ResourceConditionStatusTrue)
Expect(hasAvailable).To(BeTrue(), "nodepool should have Available=True condition")
client.ConditionTypeLastKnownReconciled, openapi.ResourceConditionStatusTrue)
Expect(hasAvailable).To(BeTrue(), "nodepool should have LastKnownReconciled=True condition")

// Validate observedGeneration for Reconciled and Available conditions
// Validate observedGeneration for Reconciled and LastKnownReconciled conditions
for _, condition := range finalNodePool.Status.Conditions {
if condition.Type == client.ConditionTypeReconciled || condition.Type == client.ConditionTypeAvailable {
if condition.Type == client.ConditionTypeReconciled || condition.Type == client.ConditionTypeLastKnownReconciled {
Expect(condition.ObservedGeneration).To(Equal(int32(1)),
"nodepool condition %s should have observed_generation=1 for new creation request", condition.Type)
}
Expand Down
4 changes: 2 additions & 2 deletions e2e/nodepool/update_edge_cases.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ var _ = ginkgo.Describe("[Suite: nodepool][update] Labels-Only PATCH",
Eventually(h.PollNodePoolAdapterStatuses(ctx, clusterID, nodepoolID), h.Cfg.Timeouts.Adapter.Processing, h.Cfg.Polling.Interval).
Should(helper.HaveAllAdaptersAtGeneration(h.Cfg.Adapters.NodePool, int32(2)))

ginkgo.By("verifying nodepool reaches Reconciled=True and Available=True")
ginkgo.By("verifying nodepool reaches Reconciled=True and LastKnownReconciled=True")
Eventually(h.PollNodePool(ctx, clusterID, nodepoolID), h.Cfg.Timeouts.NodePool.Reconciled, h.Cfg.Polling.Interval).
Should(helper.HaveResourceCondition(client.ConditionTypeReconciled, openapi.ResourceConditionStatusTrue))
Eventually(h.PollNodePool(ctx, clusterID, nodepoolID), h.Cfg.Timeouts.NodePool.Reconciled, h.Cfg.Polling.Interval).
Should(helper.HaveResourceCondition(client.ConditionTypeAvailable, openapi.ResourceConditionStatusTrue))
Should(helper.HaveResourceCondition(client.ConditionTypeLastKnownReconciled, openapi.ResourceConditionStatusTrue))

finalNP, err := h.Client.GetNodePool(ctx, clusterID, nodepoolID)
Expect(err).NotTo(HaveOccurred())
Expand Down
3 changes: 2 additions & 1 deletion pkg/client/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ const (

// Condition types used by cluster-level resources (clusters, nodepools)
const (
ConditionTypeReconciled = "Reconciled" // Resource is reconciled
ConditionTypeReconciled = "Reconciled" // Resource is reconciled
ConditionTypeLastKnownReconciled = "LastKnownReconciled" // API-computed aggregated condition (renamed from Available)
Comment thread
rh-amarin marked this conversation as resolved.
)