sigs.k8s.io/cluster-api@v1.7.1/errors/consts.go (about) 1 /* 2 Copyright 2018 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 errors 18 19 // MachineStatusError defines errors states for Machine objects. 20 type MachineStatusError string 21 22 // Constants aren't automatically generated for unversioned packages. 23 // Instead share the same constant for all versioned packages. 24 25 const ( 26 // InvalidConfigurationMachineError represents that the combination 27 // of configuration in the MachineSpec is not supported by this cluster. 28 // This is not a transient error, but 29 // indicates a state that must be fixed before progress can be made. 30 // 31 // Example: the ProviderSpec specifies an instance type that doesn't exist,. 32 InvalidConfigurationMachineError MachineStatusError = "InvalidConfiguration" 33 34 // UnsupportedChangeMachineError indicates that the MachineSpec has been updated in a way that 35 // is not supported for reconciliation on this cluster. The spec may be 36 // completely valid from a configuration standpoint, but the controller 37 // does not support changing the real world state to match the new 38 // spec. 39 // 40 // Example: the responsible controller is not capable of changing the 41 // container runtime from docker to rkt. 42 UnsupportedChangeMachineError MachineStatusError = "UnsupportedChange" 43 44 // InsufficientResourcesMachineError generally refers to exceeding one's quota in a cloud provider, 45 // or running out of physical machines in an on-premise environment. 46 InsufficientResourcesMachineError MachineStatusError = "InsufficientResources" 47 48 // CreateMachineError indicates an error while trying to create a Node to match this 49 // Machine. This may indicate a transient problem that will be fixed 50 // automatically with time, such as a service outage, or a terminal 51 // error during creation that doesn't match a more specific 52 // MachineStatusError value. 53 // 54 // Example: timeout trying to connect to GCE. 55 CreateMachineError MachineStatusError = "CreateError" 56 57 // UpdateMachineError indicates an error while trying to update a Node that this 58 // Machine represents. This may indicate a transient problem that will be 59 // fixed automatically with time, such as a service outage, 60 // 61 // Example: error updating load balancers. 62 UpdateMachineError MachineStatusError = "UpdateError" 63 64 // DeleteMachineError indicates an error was encountered while trying to delete the Node that this 65 // Machine represents. This could be a transient or terminal error, but 66 // will only be observable if the provider's Machine controller has 67 // added a finalizer to the object to more gracefully handle deletions. 68 // 69 // Example: cannot resolve EC2 IP address. 70 DeleteMachineError MachineStatusError = "DeleteError" 71 72 // JoinClusterTimeoutMachineError indicates that the machine did not join the cluster 73 // as a new node within the expected timeframe after instance 74 // creation at the provider succeeded 75 // 76 // Example use case: A controller that deletes Machines which do 77 // not result in a Node joining the cluster within a given timeout 78 // and that are managed by a MachineSet. 79 JoinClusterTimeoutMachineError = "JoinClusterTimeoutError" 80 ) 81 82 // ClusterStatusError defines errors states for Cluster objects. 83 type ClusterStatusError string 84 85 const ( 86 // InvalidConfigurationClusterError indicates that the cluster 87 // configuration is invalid. 88 InvalidConfigurationClusterError ClusterStatusError = "InvalidConfiguration" 89 90 // UnsupportedChangeClusterError indicates that the cluster 91 // spec has been updated in an unsupported way. That cannot be 92 // reconciled. 93 UnsupportedChangeClusterError ClusterStatusError = "UnsupportedChange" 94 95 // CreateClusterError indicates that an error was encountered 96 // when trying to create the cluster. 97 CreateClusterError ClusterStatusError = "CreateError" 98 99 // UpdateClusterError indicates that an error was encountered 100 // when trying to update the cluster. 101 UpdateClusterError ClusterStatusError = "UpdateError" 102 103 // DeleteClusterError indicates that an error was encountered 104 // when trying to delete the cluster. 105 DeleteClusterError ClusterStatusError = "DeleteError" 106 ) 107 108 // MachineSetStatusError defines errors states for MachineSet objects. 109 type MachineSetStatusError string 110 111 const ( 112 // InvalidConfigurationMachineSetError represents 113 // the combination of configuration in the MachineTemplateSpec 114 // is not supported by this cluster. This is not a transient error, but 115 // indicates a state that must be fixed before progress can be made. 116 // 117 // Example: the ProviderSpec specifies an instance type that doesn't exist. 118 InvalidConfigurationMachineSetError MachineSetStatusError = "InvalidConfiguration" 119 ) 120 121 // MachinePoolStatusFailure defines errors states for MachinePool objects. 122 type MachinePoolStatusFailure string 123 124 const ( 125 // InvalidConfigurationMachinePoolError represemts 126 // the combination of configuration in the MachineTemplateSpec 127 // is not supported by this cluster. This is not a transient error, but 128 // indicates a state that must be fixed before progress can be made. 129 // 130 // Example: the ProviderSpec specifies an instance type that doesn't exist. 131 InvalidConfigurationMachinePoolError MachinePoolStatusFailure = "InvalidConfiguration" 132 ) 133 134 // KubeadmControlPlaneStatusError defines errors states for KubeadmControlPlane objects. 135 type KubeadmControlPlaneStatusError string 136 137 const ( 138 // InvalidConfigurationKubeadmControlPlaneError indicates that the kubeadm control plane 139 // configuration is invalid. 140 InvalidConfigurationKubeadmControlPlaneError KubeadmControlPlaneStatusError = "InvalidConfiguration" 141 142 // UnsupportedChangeKubeadmControlPlaneError indicates that the kubeadm control plane 143 // spec has been updated in an unsupported way that cannot be 144 // reconciled. 145 UnsupportedChangeKubeadmControlPlaneError KubeadmControlPlaneStatusError = "UnsupportedChange" 146 147 // CreateKubeadmControlPlaneError indicates that an error was encountered 148 // when trying to create the kubeadm control plane. 149 CreateKubeadmControlPlaneError KubeadmControlPlaneStatusError = "CreateError" 150 151 // UpdateKubeadmControlPlaneError indicates that an error was encountered 152 // when trying to update the kubeadm control plane. 153 UpdateKubeadmControlPlaneError KubeadmControlPlaneStatusError = "UpdateError" 154 155 // DeleteKubeadmControlPlaneError indicates that an error was encountered 156 // when trying to delete the kubeadm control plane. 157 DeleteKubeadmControlPlaneError KubeadmControlPlaneStatusError = "DeleteError" 158 )