File tree Expand file tree Collapse file tree 3 files changed +9
-13
lines changed
Expand file tree Collapse file tree 3 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -16,17 +16,18 @@ test-cluster: kind ctlptl kind clean-cluster
1616 ./test/scripts/create_management_cluster.sh $(K8S_VERSION )
1717
1818clean-cluster : ctlptl
19- $(CTLPTL ) delete cluster kind-management --ignore-not-found
19+ $(CTLPTL ) delete cluster kind-ccm- management --ignore-not-found
2020 rm -rf $(MANAGEMENT_KUBECONFIG )
2121
2222reuse-and-test : SUITE_ARGS='--reuse'
2323
24- test reuse-and-test : clusterctl ginkgo check-token test-cluster
24+ test reuse-and-test : clusterctl check-token test-cluster _test
25+ $(MAKE ) clean-cluster
26+
27+ _test : ginkgo
2528 go list -m; \
2629 MANAGEMENT_KUBECONFIG=$(ROOT_DIR ) /e2e/$(MANAGEMENT_KUBECONFIG ) $(GINKGO ) -r --vv --trace $(TEST_ARGS ) -- --image=${IMG} --k8s_version=${K8S_VERSION} $(SUITE_ARGS )
2730
28- $(MAKE) clean-cluster
29-
3031clean : check-token
3132 cd test ; \
3233 ./scripts/delete_cluster.sh ccm-linode-for-reuse
Original file line number Diff line number Diff line change 2525
2626(cd ${ROOT_DIR} /deploy ; set +x ; ./generate-manifest.sh ${LINODE_TOKEN} ${LINODE_REGION} )
2727
28- kubectl create ns ${CLUSTER_NAME}
28+ kubectl create ns ${CLUSTER_NAME} || :
2929(cd $( realpath " $( dirname " $0 " ) " ) ; clusterctl generate cluster ${CLUSTER_NAME} \
3030 --target-namespace ${CLUSTER_NAME} \
3131 --flavor clusterclass-kubeadm \
@@ -37,9 +37,7 @@ until kubectl get secret -n ${CLUSTER_NAME} ${CLUSTER_NAME}-kubeconfig; do
3737 sleep $(( (c-- )) )
3838done
3939
40- kubectl get secret -n ${CLUSTER_NAME} ${CLUSTER_NAME} -kubeconfig -o jsonpath=" {.data.value}" \
41- | base64 --decode \
42- > " $( pwd) /${CLUSTER_NAME} .conf"
40+ clusterctl get kubeconfig -n ${CLUSTER_NAME} ${CLUSTER_NAME} > " $( pwd) /${CLUSTER_NAME} .conf"
4341
4442export KUBECONFIG=" $( pwd) /${CLUSTER_NAME} .conf"
4543
@@ -48,9 +46,6 @@ until kubectl version; do
4846 sleep $(( (c-- )) )
4947done
5048
51- # Skip if it's failing because of CCM is already exists.
52- kubectl apply -f ${ROOT_DIR} /deploy/ccm-linode.yaml || kubectl get clusterrole ccm-linode-clusterrole
53-
5449c=24
5550until [[ $( kubectl get no --no-headers | grep Ready | wc -l) == 3 ]]; do
5651 sleep $(( (c-- )) )
Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ export HELM_VERSION="v0.2.1"
1212export KUBECONFIG=" $( realpath " $( dirname " $0 " ) /../kind-management.conf" ) "
1313
1414ctlptl create cluster kind \
15- --name kind-management \
15+ --name kind-ccm- management \
1616 --kubernetes-version ${KUBERNETES_VERSION}
1717
1818prepare_images () {
1919 local images=" $( echo " $1 " | grep -e " ^[[:space:]]*image:[?[:space:]]" | awk ' {print $2}' ) "
2020
21- echo " ${images// [\'\"]} " | xargs -I {} sh -c ' docker pull ' {}' ; kind -n management load docker-image ' {}
21+ echo " ${images// [\'\"]} " | xargs -I {} sh -c ' docker pull ' {}' ; kind -n ccm- management load docker-image ' {}
2222}
2323
2424(set +x; prepare_images " $( curl -sfL $( cat $( realpath " $( dirname " $0 " ) /clusterctl.yaml" ) | grep cluster-api-provider-linode | awk ' {print $2}' ) ) " )
You can’t perform that action at this time.
0 commit comments