Skip to content

Commit

Permalink
remove unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Mendoza committed Apr 10, 2024
1 parent d54879c commit 5bad6e4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
3 changes: 0 additions & 3 deletions cloud/scope/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ func CreateLinodeClient(apiKey string) (*linodego.Client, error) {
}
linodeClient := linodego.NewClient(oauth2Client)

// Disable client retries to rely on controller requeues and unblock the loop.
linodeClient.SetRetryCount(0)

linodeClient.SetUserAgent(fmt.Sprintf("CAPL/%s", version.GetVersion()))

return &linodeClient, nil
Expand Down
20 changes: 19 additions & 1 deletion cloud/services/loadbalancers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,25 @@ func TestAddNodeToNBFullWorkflow(t *testing.T) {
expects func(*mock.MockLinodeMachineClient)
}{
{
name: "Success - Add the node to the NodeBalancer",
name: "If the machine is not a control plane node, do nothing",
machineScope: &scope.MachineScope{
Machine: &clusterv1.Machine{
ObjectMeta: metav1.ObjectMeta{
Name: "test-machine",
UID: "test-uid",
},
},
Cluster: &clusterv1.Cluster{
ObjectMeta: metav1.ObjectMeta{
Name: "test-cluster",
UID: "test-uid",
},
},
},
expects: func(*mock.MockLinodeMachineClient) {},
},
{
name: "Success - If the machine is a control plane node, add the node to the NodeBalancer",
machineScope: &scope.MachineScope{
Machine: &clusterv1.Machine{
ObjectMeta: metav1.ObjectMeta{
Expand Down
2 changes: 0 additions & 2 deletions util/reconciler/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ const (

// DefaultMachineControllerWaitForBootstrapDelay is the default requeue delay if bootstrap data is not ready.
DefaultMachineControllerWaitForBootstrapDelay = 5 * time.Second
// DefaultMachineControllerWaitForInstanceInitDelay is the default requeue delay during instance pre-boot initialization.
DefaultMachineControllerWaitForInstanceInitDelay = 10 * time.Second
// DefaultMachineControllerLinodeImage default image.
DefaultMachineControllerLinodeImage = "linode/ubuntu22.04"
// DefaultMachineControllerWaitForRunningDelay is the default requeue delay if instance is not running.
Expand Down

0 comments on commit 5bad6e4

Please sign in to comment.