-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrade packages to latest Signed-off-by: Jonathan Marcantonio <jmarcant@redhat.com> * Upgrade client_golang package Signed-off-by: Jonathan Marcantonio <jmarcant@redhat.com> * Upgrade cli-runtime Signed-off-by: Jonathan Marcantonio <jmarcant@redhat.com> * Upgrade kyaml Signed-off-by: Jonathan Marcantonio <jmarcant@redhat.com> * Upgrade testify & controllerruntime Signed-off-by: Jonathan Marcantonio <jmarcant@redhat.com> * Upgrade helm Signed-off-by: Jonathan Marcantonio <jmarcant@redhat.com> * Just upgrade k8s.io/api to v0.24.3 Signed-off-by: Jonathan Marcantonio <jmarcant@redhat.com> * Update controller runtime Signed-off-by: Jonathan Marcantonio <jmarcant@redhat.com> * Update gomega Signed-off-by: Jonathan Marcantonio <jmarcant@redhat.com> * update api Signed-off-by: Jonathan Marcantonio <jmarcant@redhat.com> * update channel Signed-off-by: Jonathan Marcantonio <jmarcant@redhat.com> * e2e BeforeSuite time out due to incompatible kind cluster version Signed-off-by: Xiangjing Li <xiangli@redhat.com> * upgrade action setup-go edition to v3 Signed-off-by: Xiangjing Li <xiangli@redhat.com> * upgrade channel pkg to the latest Signed-off-by: Xiangjing Li <xiangli@redhat.com> * add debug info Signed-off-by: Xiangjing Li <xiangli@redhat.com> * Ensure managed cluster Available Signed-off-by: Xiangjing Li <xiangli@redhat.com> * check addon manifestwork status Signed-off-by: Xiangjing Li <xiangli@redhat.com> * fix app addon manifestwork name Signed-off-by: Xiangjing Li <xiangli@redhat.com> * list manifestworks Signed-off-by: Xiangjing Li <xiangli@redhat.com> * check manifestwork status Signed-off-by: Xiangjing Li <xiangli@redhat.com> * check error Signed-off-by: Jonathan Marcantonio <jmarcant@redhat.com> * verify app addon status in other script Signed-off-by: Xiangjing Li <xiangli@redhat.com> * describe pod Signed-off-by: Xiangjing Li <xiangli@redhat.com> * remove LeaderElectionResourceLock Signed-off-by: Xiangjing Li <xiangli@redhat.com> * specify LeaderElectionNamespace Signed-off-by: Xiangjing Li <xiangli@redhat.com> * clean up code Signed-off-by: Xiangjing Li <xiangli@redhat.com> Co-authored-by: Xiangjing Li <xiangli@redhat.com>
- Loading branch information
1 parent
c620b78
commit 065c92b
Showing
11 changed files
with
535 additions
and
804 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash | ||
|
||
set -o nounset | ||
set -o pipefail | ||
|
||
waitForRes() { | ||
FOUND=1 | ||
MINUTE=0 | ||
resKinds=$1 | ||
resName=$2 | ||
resNamespace=$3 | ||
ignore=$4 | ||
running="\([0-9]\+\)\/\1" | ||
printf "\n#####\nWait for ${resNamespace}/${resName} to reach running state (3min).\n" | ||
while [ ${FOUND} -eq 1 ]; do | ||
# Wait up to 3min, should only take about 20-30s | ||
if [ $MINUTE -gt 180 ]; then | ||
echo "Timeout waiting for the ${resNamespace}\/${resName}." | ||
echo "List of current resources:" | ||
oc get ${resKinds} -n ${resNamespace} ${resName} | ||
echo "You should see ${resNamespace}/${resName} ${resKinds}" | ||
if [ "${resKinds}" == "pods" ]; then | ||
APP_ADDON_POD=$($KUBECTL get pods -n ${resNamespace} |grep ${resName} |awk -F' ' '{print $1}') | ||
|
||
echo "##### Output the pod log\n" | ||
$KUBECTL logs -n ${resNamespace} $APP_ADDON_POD | ||
|
||
echo "##### Describe the pod status\n" | ||
$KUBECTL describe pods -n ${resNamespace} $APP_ADDON_POD | ||
fi | ||
exit 1 | ||
fi | ||
if [ "$ignore" == "" ]; then | ||
operatorRes=`oc get ${resKinds} -n ${resNamespace} | grep ${resName}` | ||
else | ||
operatorRes=`oc get ${resKinds} -n ${resNamespace} | grep ${resName} | grep -v ${ignore}` | ||
fi | ||
if [[ $(echo $operatorRes | grep "${running}") ]]; then | ||
echo "* ${resName} is running" | ||
break | ||
elif [ "$operatorRes" == "" ]; then | ||
operatorRes="Waiting" | ||
fi | ||
echo "* STATUS: $operatorRes" | ||
sleep 5 | ||
(( MINUTE = MINUTE + 5 )) | ||
done | ||
} | ||
|
||
KUBECTL=${KUBECTL:-kubectl} | ||
|
||
echo "############ access cluster1" | ||
$KUBECTL config use-context kind-cluster1 | ||
|
||
waitForRes "pods" "application-manager" "open-cluster-management-agent-addon" "" | ||
exit 0 |
Oops, something went wrong.