Skip to content

Commit

Permalink
Remove unnecessary output redirection from kubectl commands in installer
Browse files Browse the repository at this point in the history
  • Loading branch information
vitobotta committed Jan 26, 2025
1 parent 498557c commit ac59f53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kubernetes/installer.cr
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ class Kubernetes::Installer

paths = masters.map { |master| "#{kubeconfig_path}-#{master.name}" }.join(":")

system("KUBECONFIG=#{paths} kubectl config view --flatten > #{kubeconfig_path} > /dev/null")
system("KUBECONFIG=#{kubeconfig_path} kubectl config use-context #{first_master.name} > /dev/null")
system("KUBECONFIG=#{paths} kubectl config view --flatten > #{kubeconfig_path}")
system("KUBECONFIG=#{kubeconfig_path} kubectl config use-context #{first_master.name}")

masters.each do |master|
FileUtils.rm("#{kubeconfig_path}-#{master.name}")
Expand Down

0 comments on commit ac59f53

Please sign in to comment.