Skip to content

Commit

Permalink
Refactor Kubernetes::Installer to extract software installation into …
Browse files Browse the repository at this point in the history
…a separate method
  • Loading branch information
vitobotta committed Apr 15, 2024
1 parent 7d3b00e commit c057f48
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/kubernetes/installer.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit c057f48

Please sign in to comment.