From dff6085f34a9ef973661e486bb367385046de40c Mon Sep 17 00:00:00 2001 From: Vladislav Kuzmin Date: Mon, 17 May 2021 14:52:36 +0400 Subject: [PATCH] Move kubectl calls to KRM toolbox pt.7 Move kubectl calls to phases. These phases call KRM toolbox with prepared shell scripts. Change-Id: If847bc822981f4781eed12461f16adfbf53686a6 Relates-To: #517 --- .../34_deploy_controlplane_target.sh | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/tools/deployment/34_deploy_controlplane_target.sh b/tools/deployment/34_deploy_controlplane_target.sh index 872777575..13d15c41d 100755 --- a/tools/deployment/34_deploy_controlplane_target.sh +++ b/tools/deployment/34_deploy_controlplane_target.sh @@ -14,24 +14,17 @@ set -ex -export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"} -export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"} - echo "Create target k8s cluster resources" airshipctl phase run controlplane-target --debug echo "List all nodes in target cluster" -kubectl \ - --kubeconfig $KUBECONFIG \ - --context $KUBECONFIG_TARGET_CONTEXT \ - --request-timeout 10s \ - get node - +# Scripts for this phase placed in manifests/function/phase-helpers/wait_node/ +# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap` +# and find ConfigMap with name kubectl-get-node +airshipctl phase run kubectl-get-node-target --debug echo "List all pods in target cluster" -kubectl \ - --kubeconfig $KUBECONFIG \ - --context $KUBECONFIG_TARGET_CONTEXT \ - --request-timeout 10s \ - get pods \ - --all-namespaces +# Scripts for this phase placed in manifests/function/phase-helpers/get_pods/ +# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap` +# and find ConfigMap with name kubectl-get-pods +airshipctl phase run kubectl-get-pods-target --debug