Add DNS requirement for kubernetes and helm.

`helm init` is being execute before networking and DNS is properly
configured in the controller. A dependency was added to kubernetes
to setup DNS, helm manifest was updated to depend on kubernetes.

Also, the `--skip-refresh` flag was added to helm init for second
controller to avoid timeout scenarios on proxy enviroments.

Closes-Bug: 1814968

Change-Id: I65759314b3a861e7fdb428889aa5f5c1c7037661
Suggested-by: Mingyuan Qi <mingyuan.qi@intel.com>
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
This commit is contained in:
Erich Cordoba 2019-02-19 12:09:42 -06:00
parent d9edf76bf2
commit ed3c63a06d
2 changed files with 10 additions and 3 deletions

View File

@ -76,9 +76,12 @@ class platform::helm
}
} else {
exec { 'initialize helm':
Class['::platform::kubernetes::master']
-> exec { 'initialize helm':
environment => [ 'KUBECONFIG=/etc/kubernetes/admin.conf', 'HOME=/home/wrsroot' ],
command => 'helm init --client-only',
command => 'helm init --skip-refresh --client-only',
logoutput => true,
user => 'wrsroot',
group => 'wrs',

View File

@ -16,10 +16,14 @@ class platform::kubernetes::kubeadm {
$iptables_file = "net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1"
# Ensure DNS is configured as name resolution is required when
# kubeadm init is run.
Class['::platform::dns']
# Update iptables config. This is required based on:
# https://kubernetes.io/docs/tasks/tools/install-kubeadm
# This probably belongs somewhere else - initscripts package?
file { '/etc/sysctl.d/k8s.conf':
-> file { '/etc/sysctl.d/k8s.conf':
ensure => file,
content => $iptables_file,
owner => 'root',