cluster/lib/cluster/runner.rb in sct-0.1.30 vs cluster/lib/cluster/runner.rb in sct-0.1.31
- old
+ new
@@ -292,18 +292,19 @@
return Terminal::Table.new title: "Pods (namespace: #{namespace})".green, headings: ['Name', 'Status', 'Replicas ready'], rows: rows
end
def copy_proactive_accounts_file
- pod_id = pods().select {|pod| pod[:name].start_with?("proactive-config")}.first[:name]
+ container_name = "proactive-config"
+ pod_id = pods().select {|pod| pod[:name].start_with?(container_name)}.first[:name]
begin
UI.important("Checking ProActive accounts file...")
run_command "kubectl exec #{pod_id} -- test -e /data/proactive_accounts.ini", [:out, :err] => File::NULL
rescue => e
UI.important("Copying ProActive accounts file to deployments...")
src_path = "#{Dir.home()}/development/spend-cloud/k8s/conf/proactive_accounts.ini"
- command = "kubectl cp #{src_path} #{pod_id}:/data/proactive_accounts.ini"
+ command = "kubectl cp #{src_path} #{pod_id}:/data/proactive_accounts.ini -c #{container_name}"
run_command command
end
UI.success("ProActive accounts file is available")
end