Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚠️ Status.Phase values in Cluster and Machine should be consistent with k/k #1532

Merged
merged 1 commit into from Oct 14, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions api/v1alpha3/cluster_phase_types.go
Expand Up @@ -31,25 +31,25 @@ type ClusterPhase string
const (
// ClusterPhasePending is the first state a Cluster is assigned by
// Cluster API Cluster controller after being created.
ClusterPhasePending = ClusterPhase("pending")
ClusterPhasePending = ClusterPhase("Pending")

// ClusterPhaseProvisioning is the state when the Cluster has a provider infrastructure
// object associated and can start provisioning.
ClusterPhaseProvisioning = ClusterPhase("provisioning")
ClusterPhaseProvisioning = ClusterPhase("Provisioning")

// ClusterPhaseProvisioned is the state when its
// infrastructure has been created and configured.
ClusterPhaseProvisioned = ClusterPhase("provisioned")
ClusterPhaseProvisioned = ClusterPhase("Provisioned")

// ClusterPhaseDeleting is the Cluster state when a delete
// request has been sent to the API Server,
// but its infrastructure has not yet been fully deleted.
ClusterPhaseDeleting = ClusterPhase("deleting")
ClusterPhaseDeleting = ClusterPhase("Deleting")

// ClusterPhaseFailed is the Cluster state when the system
// might require user intervention.
ClusterPhaseFailed = ClusterPhase("failed")
ClusterPhaseFailed = ClusterPhase("Failed")

// ClusterPhaseUnknown is returned if the Cluster state cannot be determined.
ClusterPhaseUnknown = ClusterPhase("")
ClusterPhaseUnknown = ClusterPhase("Unknown")
)
16 changes: 8 additions & 8 deletions api/v1alpha3/machine_phase_types.go
Expand Up @@ -31,34 +31,34 @@ type MachinePhase string
const (
// MachinePhasePending is the first state a Machine is assigned by
// Cluster API Machine controller after being created.
MachinePhasePending = MachinePhase("pending")
MachinePhasePending = MachinePhase("Pending")

// MachinePhaseProvisioning is the state when the
// Machine infrastructure is being created.
MachinePhaseProvisioning = MachinePhase("provisioning")
MachinePhaseProvisioning = MachinePhase("Provisioning")

// MachinePhaseProvisioned is the state when its
// infrastructure has been created and configured.
MachinePhaseProvisioned = MachinePhase("provisioned")
MachinePhaseProvisioned = MachinePhase("Provisioned")

// MachinePhaseRunning is the Machine state when it has
// become a Kubernetes Node in a Ready state.
MachinePhaseRunning = MachinePhase("running")
MachinePhaseRunning = MachinePhase("Running")

// MachinePhaseDeleting is the Machine state when a delete
// request has been sent to the API Server,
// but its infrastructure has not yet been fully deleted.
MachinePhaseDeleting = MachinePhase("deleting")
MachinePhaseDeleting = MachinePhase("Deleting")

// MachinePhaseDeleted is the Machine state when the object
// and the related infrastructure is deleted and
// ready to be garbage collected by the API Server.
MachinePhaseDeleted = MachinePhase("deleted")
MachinePhaseDeleted = MachinePhase("Deleted")

// MachinePhaseFailed is the Machine state when the system
// might require user intervention.
MachinePhaseFailed = MachinePhase("failed")
MachinePhaseFailed = MachinePhase("Failed")

// MachinePhaseUnknown is returned if the Machine state cannot be determined.
MachinePhaseUnknown = MachinePhase("")
MachinePhaseUnknown = MachinePhase("Unknown")
)
2 changes: 1 addition & 1 deletion test/integration/cluster/cluster_test.go
Expand Up @@ -102,7 +102,7 @@ var _ = Describe("Cluster-Controller", func() {
if err := apiclient.Get(ctx, client.ObjectKey{Name: cluster.Name, Namespace: cluster.Namespace}, cluster); err != nil {
return false
}
return cluster.Status.Phase == "pending"
return cluster.Status.Phase == string(clusterv1.ClusterPhasePending)
}).Should(BeTrue())

close(done)
Expand Down