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
This commit is contained in:
parent
22b84b2ca0
commit
dff6085f34
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user