From e377eb06714e5f53b64ae1d6f699e47bf6b13af3 Mon Sep 17 00:00:00 2001
From: Pawel Wieczorek
Date: Mon, 15 Jul 2019 18:10:02 +0200
Subject: k8s: Replace default DNS to work in corporate networks
Default DNS addresses used in "generic/ubuntu1604" box (4.2.2.1,
4.2.2.2, 208.67.220.220) might not work properly in corporate
environment. To deal with this, host machine DNS configuration can be
used instead.
Issue-ID: SECCOM-235
Change-Id: Ic8a5553f01989e1a2b00228fa0449a680f11d452
Signed-off-by: Pawel Wieczorek
---
test/security/k8s/vagrant/casablanca/Vagrantfile | 3 +++
1 file changed, 3 insertions(+)
(limited to 'test')
diff --git a/test/security/k8s/vagrant/casablanca/Vagrantfile b/test/security/k8s/vagrant/casablanca/Vagrantfile
index bed8f3e9c..4898d7952 100644
--- a/test/security/k8s/vagrant/casablanca/Vagrantfile
+++ b/test/security/k8s/vagrant/casablanca/Vagrantfile
@@ -1,6 +1,8 @@
# -*- mode: ruby -*-
# -*- coding: utf-8 -*-
+host_ip = "192.168.121.1"
+
vm_memory = 2 * 1024
vm_cpus = 1
@@ -27,6 +29,7 @@ Vagrant.configure('2') do |config|
end
config.vm.network :private_network, ip: node[:ip]
+ config.vm.provision :shell, inline: "echo nameserver #{host_ip} | resolvconf -a eth0.inet"
if node[:name] == 'master'
config.vm.network "forwarded_port", guest: 8080, host: 8080
--
cgit 1.2.3-korg