|
| 1 | +/* |
| 2 | +Copyright 2023 IONOS Cloud. |
| 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 v1alpha2 |
| 18 | + |
| 19 | +import clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" |
| 20 | + |
| 21 | +const ( |
| 22 | + // VMProvisionedCondition documents the status of the provisioning of a ProxmoxMachine and its underlying ProxmoxVM. |
| 23 | + VMProvisionedCondition clusterv1.ConditionType = "VMProvisioned" |
| 24 | + |
| 25 | + // VMProvisionFailedReason used for failures during instance provisioning. |
| 26 | + VMProvisionFailedReason = "VMProvisionFailed" |
| 27 | + |
| 28 | + // VMTerminatedReason used when vm is being terminated. |
| 29 | + VMTerminatedReason = "VMTerminated" |
| 30 | + |
| 31 | + // WaitingForClusterInfrastructureReason (Severity=Info) documents a ProxmoxMachine waiting for the cluster |
| 32 | + // infrastructure to be ready before starting the provisioning process. |
| 33 | + // |
| 34 | + // NOTE: This reason does not apply to ProxmoxVM (this state happens before the ProxmoxVM is actually created). |
| 35 | + WaitingForClusterInfrastructureReason = "WaitingForClusterInfrastructure" |
| 36 | + |
| 37 | + // WaitingForBootstrapDataReason (Severity=Info) documents a ProxmoxMachine waiting for the bootstrap |
| 38 | + // script to be ready before starting the provisioning process. |
| 39 | + // |
| 40 | + // NOTE: This reason does not apply to ProxmoxVM (this state happens before the ProxmoxVM is actually created). |
| 41 | + WaitingForBootstrapDataReason = "WaitingForBootstrapData" |
| 42 | + |
| 43 | + // WaitingForStaticIPAllocationReason (Severity=Info) documents a ProxmoxVM waiting for the allocation of |
| 44 | + // a static IP address. |
| 45 | + WaitingForStaticIPAllocationReason = "WaitingForStaticIPAllocation" |
| 46 | + |
| 47 | + // CloningReason documents (Severity=Info) a ProxmoxMachine/ProxmoxVM currently executing the clone operation. |
| 48 | + CloningReason = "Cloning" |
| 49 | + |
| 50 | + // CloningFailedReason (Severity=Warning) documents a ProxmoxMachine/ProxmoxVM controller detecting |
| 51 | + // an error while provisioning; those kind of errors are usually transient and failed provisioning |
| 52 | + // are automatically re-tried by the controller. |
| 53 | + CloningFailedReason = "CloningFailed" |
| 54 | + |
| 55 | + // PoweringOnReason documents (Severity=Info) a ProxmoxMachine/ProxmoxVM currently executing the power on sequence. |
| 56 | + PoweringOnReason = "PoweringOn" |
| 57 | + |
| 58 | + // PoweringOnFailedReason (Severity=Warning) documents a ProxmoxMachine/ProxmoxVM controller detecting |
| 59 | + // an error while powering on; those kind of errors are usually transient and failed provisioning |
| 60 | + // are automatically re-tried by the controller. |
| 61 | + PoweringOnFailedReason = "PoweringOnFailed" |
| 62 | + |
| 63 | + // VMProvisionStarted used for starting vm provisioning. |
| 64 | + VMProvisionStarted = "VMProvisionStarted" |
| 65 | + |
| 66 | + // TaskFailure (Severity=Warning) documents a ProxmoxMachine/Proxmox task failure; the reconcile look will automatically |
| 67 | + // retry the operation, but a user intervention might be required to fix the problem. |
| 68 | + TaskFailure = "TaskFailure" |
| 69 | + |
| 70 | + // WaitingForNetworkAddressesReason (Severity=Info) documents a ProxmoxMachine waiting for the the machine network |
| 71 | + // settings to be reported after machine being powered on. |
| 72 | + // |
| 73 | + // NOTE: This reason does not apply to ProxmoxVM (this state happens after the ProxmoxVM is in ready state). |
| 74 | + WaitingForNetworkAddressesReason = "WaitingForNetworkAddresses" |
| 75 | + |
| 76 | + // NotFoundReason (Severity=Warning) documents the ProxmoxVM not found. |
| 77 | + NotFoundReason = "NotFound" |
| 78 | + |
| 79 | + // UnknownReason (Severity=Warning) documents the ProxmoxVM Unknown. |
| 80 | + UnknownReason = "Unknown" |
| 81 | + |
| 82 | + // MissingControlPlaneEndpointReason (Severity=Warning) documents the missing Control Plane endpoint when Cluster is backed by an externally managed Control Plane. |
| 83 | + MissingControlPlaneEndpointReason = "MissingControlPlaneEndpoint" |
| 84 | +) |
| 85 | + |
| 86 | +const ( |
| 87 | + // ProxmoxClusterReady documents the status of ProxmoxCluster and its underlying resources. |
| 88 | + ProxmoxClusterReady clusterv1.ConditionType = "ClusterReady" |
| 89 | + |
| 90 | + // ProxmoxUnreachableReason (Severity=Error) documents a controller detecting |
| 91 | + // issues with Proxmox reachability. |
| 92 | + ProxmoxUnreachableReason = "ProxmoxUnreachable" |
| 93 | +) |
0 commit comments