Ignore error on k8s taint removal from puppet

There are cases where the kubernetes taint is not present on,
or has already been removed from, a newly configured standby
controller. This causes the taint removal command run by the
puppet manifest to fail. This failure can be safely ignored,
so the command is updated by this commit to always return
success.

Change-Id: Icdb55738e052c65a28e44582e345038b0de83c37
Closes-Bug: 1815795
Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
Don Penney 2019-02-21 11:33:30 -05:00
parent 28766a8d43
commit 4b35404d6a
1 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ class platform::kubernetes::master::init
# Remove the taint from the master node
-> exec { 'remove taint from master node':
command => "kubectl --kubeconfig=/etc/kubernetes/admin.conf taint node ${::platform::params::hostname} node-role.kubernetes.io/master-", # lint:ignore:140chars
command => "kubectl --kubeconfig=/etc/kubernetes/admin.conf taint node ${::platform::params::hostname} node-role.kubernetes.io/master- || true", # lint:ignore:140chars
logoutput => true,
}
@ -230,7 +230,7 @@ class platform::kubernetes::master::init
# Remove the taint from the master node
-> exec { 'remove taint from master node':
command => "kubectl --kubeconfig=/etc/kubernetes/admin.conf taint node ${::platform::params::hostname} node-role.kubernetes.io/master-", # lint:ignore:140chars
command => "kubectl --kubeconfig=/etc/kubernetes/admin.conf taint node ${::platform::params::hostname} node-role.kubernetes.io/master- || true", # lint:ignore:140chars
logoutput => true,
}