From 2d13ea81519bacdd7f17ce91ec06bc7ac26a6cac Mon Sep 17 00:00:00 2001 From: Pawel Wieczorek Date: Mon, 29 Jul 2019 13:17:51 +0200 Subject: k8s: Add kubectl provisioners (downloading and setting up) Setting up kubectl depends on presence of K8s cluster post-deployment artifacts, hence it's disabled by default. Relevant information added to post-up message. This patch also removes unneeded curly braces from "tools/dublin/get_rke.sh" script. Issue-ID: SECCOM-235 Change-Id: I917ebbda588639f0941e16c65759430a7a1e64ff Signed-off-by: Pawel Wieczorek --- test/security/k8s/vagrant/dublin/Vagrantfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/security/k8s/vagrant/dublin') diff --git a/test/security/k8s/vagrant/dublin/Vagrantfile b/test/security/k8s/vagrant/dublin/Vagrantfile index 148903773..ce442eb98 100644 --- a/test/security/k8s/vagrant/dublin/Vagrantfile +++ b/test/security/k8s/vagrant/dublin/Vagrantfile @@ -21,7 +21,7 @@ cluster = [ all = cluster.dup << operation -operation_post_msg = "Run: \"vagrant provision #{operation[:name]} --provision-with=rke_up\" to complete cluster creation" +operation_post_msg = "Run: \"vagrant provision #{operation[:name]} --provision-with=rke_up,setup_kubectl\" to complete cluster creation" $replace_dns = <<-SCRIPT HOST_IP="$1" @@ -150,6 +150,12 @@ Vagrant.configure('2') do |config| trigger.warn = "Removing cluster" trigger.run_remote = {privileged: false, inline: $rke_down} end + + config.vm.provision "get_kubectl", type: :shell, path: "../../tools/dublin/get_kubectl.sh" + config.vm.provision "setup_kubectl", type: :shell, run: "never" do |s| + s.privileged = false + s.path = "../../tools/dublin/setup_kubectl.sh" + end end end end -- cgit 1.2.3-korg