From c057f48cd43f2b73748b451ebe7d869618be5c38 Mon Sep 17 00:00:00 2001 From: Vito Botta Date: Mon, 15 Apr 2024 12:21:06 +0000 Subject: [PATCH] Refactor Kubernetes::Installer to extract software installation into a separate method --- src/kubernetes/installer.cr | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/kubernetes/installer.cr b/src/kubernetes/installer.cr index 637fb86..d4788cf 100644 --- a/src/kubernetes/installer.cr +++ b/src/kubernetes/installer.cr @@ -46,11 +46,7 @@ class Kubernetes::Installer add_labels_and_taints_to_masters add_labels_and_taints_to_workers - Kubernetes::Software::Hetzner::Secret.new(configuration, settings).create - Kubernetes::Software::Hetzner::CloudControllerManager.new(configuration, settings).install - Kubernetes::Software::Hetzner::CSIDriver.new(configuration, settings).install - Kubernetes::Software::SystemUpgradeController.new(configuration, settings).install - deploy_cluster_autoscaler + install_software end private def set_up_first_master @@ -314,4 +310,12 @@ class Kubernetes::Installer end sans.join(" ") end + + private def install_software + Kubernetes::Software::Hetzner::Secret.new(configuration, settings).create + Kubernetes::Software::Hetzner::CloudControllerManager.new(configuration, settings).install + Kubernetes::Software::Hetzner::CSIDriver.new(configuration, settings).install + Kubernetes::Software::SystemUpgradeController.new(configuration, settings).install + deploy_cluster_autoscaler + end end