Improve the script 33 to retrieve the target node from rendered

document

Changes from hard coded value node01 to retrieve the first target
node name from the rendered phase document

Signed-off-by: James Gu <james.gu@att.com>
Change-Id: I5e80b34a3a1267b75202b2bdef9d43d053bf22c5
(cherry picked from commit 1ceecdb1f198e1fc4bb9f4c53b2a57a350822947)
This commit is contained in:
James Gu 2021-04-13 08:31:57 -07:00 committed by Sirajudeen
parent ab7bbfce89
commit 0caba8690d

View File

@ -19,6 +19,11 @@ export TIMEOUT=${TIMEOUT:-3600}
export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"}
export CLUSTER_NAMESPACE=${CLUSTER_NAMESPACE:-"default"}
export TARGET_NODE=${TARGET_NODE:-"$(airshipctl phase render controlplane-ephemeral \
-k BareMetalHost -l airshipit.org/k8s-role=controlplane-host \
2> /dev/null | \
yq .metadata.name | \
sed 's/"//g')"}
# Annotating BMH objects with a pause label
# Scripts for this phase placed in manifests/function/phase-helpers/pause_bmh/