From fa6fc01a55e8dc7b460b94a0c5382f978e66ac04 Mon Sep 17 00:00:00 2001 From: Rahul Sharma Date: Wed, 24 Apr 2024 21:13:12 +0000 Subject: [PATCH] address review comments, add vpc note --- controller/linodemachine_controller.go | 8 ++++---- docs/src/developers/development.md | 5 ++++- docs/src/topics/getting-started.md | 3 +++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/controller/linodemachine_controller.go b/controller/linodemachine_controller.go index 1c88ae073..6454cadcc 100644 --- a/controller/linodemachine_controller.go +++ b/controller/linodemachine_controller.go @@ -61,7 +61,7 @@ const ( ConditionPreflightAdditionalDisksCreated clusterv1.ConditionType = "PreflightAdditionalDisksCreated" ConditionPreflightConfigured clusterv1.ConditionType = "PreflightConfigured" ConditionPreflightBootTriggered clusterv1.ConditionType = "PreflightBootTriggered" - ConditionPreflightNBConfigured clusterv1.ConditionType = "PreflightNBConfigured" + ConditionPreflightNetworking clusterv1.ConditionType = "PreflightNetworking" ConditionPreflightReady clusterv1.ConditionType = "PreflightReady" ) @@ -351,12 +351,12 @@ func (r *LinodeMachineReconciler) reconcileInstanceCreate( conditions.MarkTrue(machineScope.LinodeMachine, ConditionPreflightBootTriggered) } - if !reconciler.ConditionTrue(machineScope.LinodeMachine, ConditionPreflightNBConfigured) { + if !reconciler.ConditionTrue(machineScope.LinodeMachine, ConditionPreflightNetworking) { if err := services.AddNodeToNB(ctx, logger, machineScope); err != nil { logger.Error(err, "Failed to add instance to Node Balancer backend") if reconciler.RecordDecayingCondition(machineScope.LinodeMachine, - ConditionPreflightNBConfigured, string(cerrs.CreateMachineError), err.Error(), + ConditionPreflightNetworking, string(cerrs.CreateMachineError), err.Error(), reconciler.DefaultMachineControllerPreflightTimeout(r.ReconcileTimeout)) { return ctrl.Result{}, err } @@ -364,7 +364,7 @@ func (r *LinodeMachineReconciler) reconcileInstanceCreate( return ctrl.Result{RequeueAfter: reconciler.DefaultMachineControllerWaitForRunningDelay}, nil } - conditions.MarkTrue(machineScope.LinodeMachine, ConditionPreflightNBConfigured) + conditions.MarkTrue(machineScope.LinodeMachine, ConditionPreflightNetworking) } if !reconciler.ConditionTrue(machineScope.LinodeMachine, ConditionPreflightReady) { diff --git a/docs/src/developers/development.md b/docs/src/developers/development.md index 861451d74..a483623d5 100644 --- a/docs/src/developers/development.md +++ b/docs/src/developers/development.md @@ -213,7 +213,7 @@ clusterctl generate cluster $CLUSTER_NAME \ | kubectl apply -f - ``` -This will provision the cluster with the CNI defaulted to [cilium](../topics/addons.md#cilium) +This will provision the cluster within VPC with the CNI defaulted to [cilium](../topics/addons.md#cilium) and the [linode-ccm](../topics/addons.md#ccm) installed. ##### Using ClusterClass (alpha) @@ -245,6 +245,9 @@ To delete the cluster, simply run: ```sh kubectl delete cluster $CLUSTER_NAME ``` +```admonish warning +VPCs are not deleted when a cluster is deleted using kubectl. One can run `kubectl delete linodevpc ` to cleanup VPC once cluster is deleted. +``` ```admonish question title="" For any issues, please refer to the [troubleshooting guide](../topics/troubleshooting.md). diff --git a/docs/src/topics/getting-started.md b/docs/src/topics/getting-started.md index d2bb4e8ec..658edfd84 100644 --- a/docs/src/topics/getting-started.md +++ b/docs/src/topics/getting-started.md @@ -32,6 +32,9 @@ export LINODE_MACHINE_TYPE=g6-standard-2 For Regions and Images that do not yet support Akamai's cloud-init datasource CAPL will automatically use a stackscript shim to provision the node. If you are using a custom image ensure the [cloud_init](https://www.linode.com/docs/api/images/#image-create) flag is set correctly on it ``` +```admonish warning +By default, clusters are provisioned within VPC. For Regions which do not have [VPC support](https://www.linode.com/docs/products/networking/vpc/#availability) yet, use the VPCLess[TODO] flavor to have clusters provisioned. +``` ## Register linode as an infrastructure provider 1. Add `linode` as an infrastructure provider in `~/.cluster-api/clusterctl.yaml`