sigs.k8s.io/cluster-api@v1.7.1/api/v1beta1/machine_phase_types.go (about)

     1  /*
     2  Copyright 2021 The Kubernetes Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package v1beta1
    18  
    19  // MachinePhase is a string representation of a Machine Phase.
    20  //
    21  // This type is a high-level indicator of the status of the Machine as it is provisioned,
    22  // from the API user’s perspective.
    23  //
    24  // The value should not be interpreted by any software components as a reliable indication
    25  // of the actual state of the Machine, and controllers should not use the Machine Phase field
    26  // value when making decisions about what action to take.
    27  //
    28  // Controllers should always look at the actual state of the Machine’s fields to make those decisions.
    29  type MachinePhase string
    30  
    31  const (
    32  	// MachinePhasePending is the first state a Machine is assigned by
    33  	// Cluster API Machine controller after being created.
    34  	MachinePhasePending = MachinePhase("Pending")
    35  
    36  	// MachinePhaseProvisioning is the state when the
    37  	// Machine infrastructure is being created.
    38  	MachinePhaseProvisioning = MachinePhase("Provisioning")
    39  
    40  	// MachinePhaseProvisioned is the state when its
    41  	// infrastructure has been created and configured.
    42  	MachinePhaseProvisioned = MachinePhase("Provisioned")
    43  
    44  	// MachinePhaseRunning is the Machine state when it has
    45  	// become a Kubernetes Node in a Ready state.
    46  	MachinePhaseRunning = MachinePhase("Running")
    47  
    48  	// MachinePhaseDeleting is the Machine state when a delete
    49  	// request has been sent to the API Server,
    50  	// but its infrastructure has not yet been fully deleted.
    51  	MachinePhaseDeleting = MachinePhase("Deleting")
    52  
    53  	// MachinePhaseDeleted is the Machine state when the object
    54  	// and the related infrastructure is deleted and
    55  	// ready to be garbage collected by the API Server.
    56  	MachinePhaseDeleted = MachinePhase("Deleted")
    57  
    58  	// MachinePhaseFailed is the Machine state when the system
    59  	// might require user intervention.
    60  	MachinePhaseFailed = MachinePhase("Failed")
    61  
    62  	// MachinePhaseUnknown is returned if the Machine state cannot be determined.
    63  	MachinePhaseUnknown = MachinePhase("Unknown")
    64  )