Fix kubectl drain command on puppet manifest
The k8s upgrade shows error during upgrade abort with an error on the "kubectl drain" command [1]. The commit that introduced this issue is likely [2]. This commit fix the "kubectl drain" command. [1]:f65f702ffd/puppet-manifests/src/modules/platform/manifests/kubernetes.pp (L1709)[2]:578b64b6eeTest Plan PASS: start k8s upgrade, upgrade control plane, abort the upgrade and verify that cordon.log shows no errors PASS: start k8s orchestrated upgrade, verify that cordon.log shows no errors after kube upgrade strategy fails Closes-bug: 2049505 Change-Id: Id376ae991c66300481c99f86c4e6020f7b7ac5af Signed-off-by: Heitor Matsui <heitorvieira.matsui@windriver.com>
This commit is contained in:
@@ -1706,7 +1706,7 @@ class platform::kubernetes::cordon_node {
|
||||
# unsatisfied pod-disruption-budget, and may also run long if there
|
||||
# are lots of pods to drain, so limit operation to 150 seconds.
|
||||
platform::kubernetes::kube_command { 'drain the node':
|
||||
command => "kubectl -drain ${::platform::params::hostname} \
|
||||
command => "kubectl drain ${::platform::params::hostname} \
|
||||
--ignore-daemonsets --delete-emptydir-data \
|
||||
--skip-wait-for-delete-timeout=10 \
|
||||
--force --timeout=150s",
|
||||
|
||||
Reference in New Issue
Block a user