# change owner of results created by root in container
if [ -d "$results_dir" ]
then
- sudo chown -R "$current_user" "$results_dir"
+ sudo chown -R "$current_user" "$results_dir" "$k8s_config_dir"
fi
}
if [[ -n ${ssh_password} ]]
then
sshpass -p "${ssh_password}" scp -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -r\
- "${ssh_user}@${cluster_master_ip}:~/.kube/*" "$k8s_config_dir"
+ "${ssh_user}@${cluster_master_ip}:~/.kube/config" "$k8s_config_dir"
else
scp -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -i"$ssh_key" -r\
- "${ssh_user}"@"${cluster_master_ip}":~/.kube/* "$k8s_config_dir"
+ "${ssh_user}"@"${cluster_master_ip}":~/.kube/config "$k8s_config_dir"
fi
fi