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:
parent
d9edf76bf2
commit
ed3c63a06d
|
@ -76,9 +76,12 @@ class platform::helm
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
exec { 'initialize helm':
|
|
||||||
|
Class['::platform::kubernetes::master']
|
||||||
|
|
||||||
|
-> exec { 'initialize helm':
|
||||||
environment => [ 'KUBECONFIG=/etc/kubernetes/admin.conf', 'HOME=/home/wrsroot' ],
|
environment => [ 'KUBECONFIG=/etc/kubernetes/admin.conf', 'HOME=/home/wrsroot' ],
|
||||||
command => 'helm init --client-only',
|
command => 'helm init --skip-refresh --client-only',
|
||||||
logoutput => true,
|
logoutput => true,
|
||||||
user => 'wrsroot',
|
user => 'wrsroot',
|
||||||
group => 'wrs',
|
group => 'wrs',
|
||||||
|
|
|
@ -16,10 +16,14 @@ class platform::kubernetes::kubeadm {
|
||||||
$iptables_file = "net.bridge.bridge-nf-call-ip6tables = 1
|
$iptables_file = "net.bridge.bridge-nf-call-ip6tables = 1
|
||||||
net.bridge.bridge-nf-call-iptables = 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:
|
# Update iptables config. This is required based on:
|
||||||
# https://kubernetes.io/docs/tasks/tools/install-kubeadm
|
# https://kubernetes.io/docs/tasks/tools/install-kubeadm
|
||||||
# This probably belongs somewhere else - initscripts package?
|
# This probably belongs somewhere else - initscripts package?
|
||||||
file { '/etc/sysctl.d/k8s.conf':
|
-> file { '/etc/sysctl.d/k8s.conf':
|
||||||
ensure => file,
|
ensure => file,
|
||||||
content => $iptables_file,
|
content => $iptables_file,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
|
|
Loading…
Reference in New Issue