Merge "check value of kubernetes host labels"

This commit is contained in:
Zuul 2021-08-19 13:23:45 +00:00 committed by Gerrit Code Review
commit 063010b90f
2 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ class platform::kubernetes::params (
class platform::kubernetes::configuration {
if 'kube-ignore-isol-cpus' in $::platform::kubernetes::params::host_labels {
if 'kube-ignore-isol-cpus=enabled' in $::platform::kubernetes::params::host_labels {
$ensure = 'present'
} else {
$ensure = 'absent'
@ -212,7 +212,7 @@ class platform::kubernetes::kubeadm {
} else {
if !$::platform::params::virtual_system {
if str2bool($::is_worker_subfunction)
and !('openstack-compute-node' in $host_labels) {
and !('openstack-compute-node=enabled' in $host_labels) {
# Enable TopologyManager for hosts with the worker subfunction.
# Exceptions are:
# - DC System controllers
@ -498,7 +498,7 @@ class platform::kubernetes::worker::sriovdp {
$host_labels = $::platform::kubernetes::params::host_labels
if ($::personality == 'controller') and
str2bool($::is_worker_subfunction)
and ('sriovdp' in $host_labels) {
and ('sriovdp=enabled' in $host_labels) {
exec { 'Delete sriov device plugin pod if present':
path => '/usr/bin:/usr/sbin:/bin',
command => 'kubectl --kubeconfig=/etc/kubernetes/admin.conf delete pod -n kube-system --selector=app=sriovdp --field-selector spec.nodeName=$(hostname) --timeout=360s', # lint:ignore:140chars

View File

@ -18,7 +18,7 @@ class platform::lmon
$host_labels = $::platform::kubernetes::params::host_labels
$data_interface = length($data_iface_devices) > 0
and !('openstack-compute-node'
and !('openstack-compute-node=enabled'
in $host_labels)
$data_interface_str = join($data_iface_devices,',')