AIO manifest to start kubernetes once
This change is to avoid restarting kubernetes. Also calling sysinv-reset-n3000-fpgas to reset N3000 FPGAS on host start up. Depends-On: https://review.opendev.org/c/starlingx/config/+/785683 Depends-On: https://review.opendev.org/c/starlingx/stx-puppet/+/780600 Change-Id: I4a27840820fd45ad86cef4dfce6ea0389e583f68 Partial-Bug: 1918139 Signed-off-by: Bin Qian <bin.qian@windriver.com>
This commit is contained in:
@@ -37,7 +37,7 @@ include ::platform::etcd
|
||||
include ::platform::docker::controller
|
||||
include ::platform::dockerdistribution
|
||||
include ::platform::containerd::controller
|
||||
include ::platform::kubernetes::master
|
||||
include ::platform::kubernetes::gate
|
||||
include ::platform::helm
|
||||
include ::platform::armada
|
||||
|
||||
@@ -103,10 +103,10 @@ include ::platform::compute
|
||||
include ::platform::vswitch
|
||||
include ::platform::devices
|
||||
include ::platform::interfaces::sriov::config
|
||||
include ::platform::kubernetes::worker
|
||||
include ::platform::worker::storage
|
||||
include ::platform::pciirqaffinity
|
||||
include ::platform::docker::login
|
||||
include ::platform::kubernetes::aio
|
||||
|
||||
include ::platform::lvm::compute
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ include ::platform::docker::controller
|
||||
include ::platform::dockerdistribution
|
||||
include ::platform::containerd::controller
|
||||
include ::platform::kubernetes::master
|
||||
include ::platform::kubernetes::gate
|
||||
include ::platform::helm
|
||||
include ::platform::armada
|
||||
|
||||
|
||||
@@ -132,16 +132,17 @@ class platform::devices::fpga::fec::params (
|
||||
$device_config = {}
|
||||
) { }
|
||||
|
||||
class platform::devices::fpga::n3000::reset {
|
||||
# The N3000 FPGA is reset via docker container application by the
|
||||
# sysinv FPGA agent on startup. This will clear the number of VFs
|
||||
# configured on the FEC device as well as any bound drivers.
|
||||
exec { 'Waiting for n3000 reset before enabling device':
|
||||
command => 'test -e /var/run/.sysinv_n3000_reset',
|
||||
path => '/usr/bin/',
|
||||
class platform::devices::fpga::n3000::reset
|
||||
inherits ::platform::devices::fpga::fec::params {
|
||||
# To reset N3000 FPGA
|
||||
Class[$name] -> Class['::platform::devices::fpga::fec::config']
|
||||
exec { 'Reset n3000 fpgas':
|
||||
command => 'sysinv-reset-n3000-fpgas',
|
||||
path => ['/usr/bin/', '/usr/sbin/'],
|
||||
tries => 60,
|
||||
try_sleep => 1,
|
||||
require => Anchor['platform::networking'],
|
||||
unless => 'test -e /var/run/.sysinv_n3000_reset'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,6 +153,7 @@ class platform::devices::fpga::fec::config
|
||||
}
|
||||
|
||||
class platform::devices::fpga::fec {
|
||||
include platform::devices::fpga::n3000::reset
|
||||
Class[$name] -> Class['::sysinv::agent']
|
||||
require ::platform::devices::fpga::fec::config
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ class platform::firewall::calico::oam {
|
||||
contain ::platform::firewall::calico::oam::endpoints
|
||||
contain ::platform::firewall::calico::oam::services
|
||||
|
||||
Class['::platform::kubernetes::master'] -> Class[$name]
|
||||
Class['::platform::kubernetes::gate'] -> Class[$name]
|
||||
Class['::platform::firewall::calico::oam::endpoints']
|
||||
-> Class['::platform::firewall::calico::oam::services']
|
||||
}
|
||||
|
||||
@@ -93,8 +93,7 @@ class platform::helm
|
||||
if (str2bool($::is_initial_config) and $::personality == 'controller') {
|
||||
include ::platform::helm::repositories
|
||||
|
||||
Class['::platform::kubernetes::master']
|
||||
|
||||
Class['::platform::kubernetes::gate']
|
||||
-> exec { 'restart lighttpd for helm':
|
||||
require => [File['/etc/lighttpd/lighttpd.conf', $target_helm_repos_base_dir, $source_helm_repos_base_dir]],
|
||||
command => 'systemctl restart lighttpd.service',
|
||||
|
||||
@@ -446,9 +446,6 @@ class platform::kubernetes::worker
|
||||
-> Class['::platform::kubernetes::cgroup']
|
||||
-> Class['::platform::kubernetes::worker::init']
|
||||
} else {
|
||||
# Reconfigure cgroups cpusets on AIO
|
||||
contain ::platform::kubernetes::cgroup
|
||||
|
||||
Class['::platform::compute::allocate']
|
||||
-> service { 'kubelet':
|
||||
enable => true,
|
||||
@@ -466,6 +463,25 @@ class platform::kubernetes::worker
|
||||
contain ::platform::kubernetes::worker::pci
|
||||
}
|
||||
|
||||
class platform::kubernetes::aio
|
||||
inherits ::platform::kubernetes::params {
|
||||
|
||||
include ::platform::kubernetes::master
|
||||
include ::platform::kubernetes::worker
|
||||
|
||||
Class['::platform::kubernetes::master']
|
||||
-> Class['::platform::kubernetes::worker']
|
||||
-> Class[$name]
|
||||
}
|
||||
|
||||
class platform::kubernetes::gate {
|
||||
if $::platform::params::system_type != 'All-in-one' {
|
||||
Class['::platform::kubernetes::master'] -> Class[$name]
|
||||
} else {
|
||||
Class['::platform::kubernetes::aio'] -> Class[$name]
|
||||
}
|
||||
}
|
||||
|
||||
class platform::kubernetes::coredns {
|
||||
|
||||
include ::platform::params
|
||||
|
||||
Reference in New Issue
Block a user