Fix e2e tests and devworkspace CRD creation
Signed-off-by: Flavius Lacatusu <flacatus@redhat.com>pull/721/head
parent
cb5788fa8f
commit
3d2c039637
|
|
@ -1,6 +1,6 @@
|
|||
# Che/CodeReady Workspaces Operator
|
||||
|
||||
[](https://codecov.io/gh/eclipse/che-operator)
|
||||
[](https://codecov.io/gh/eclipse-che/che-operator)
|
||||
|
||||
Che/CodeReady workspaces operator uses [Operator SDK](https://github.com/operator-framework/operator-sdk) and [Go Kube client](https://github.com/kubernetes/client-go) to deploy, update and manage K8S/OpenShift resources that constitute a single or multi-user Eclipse Che/CodeReady Workspaces cluster.
|
||||
|
||||
|
|
|
|||
20
olm/olm.sh
20
olm/olm.sh
|
|
@ -499,6 +499,21 @@ waitCheServerDeploy() {
|
|||
fi
|
||||
}
|
||||
|
||||
waitCatalogSourcePod() {
|
||||
CURRENT_TIME=$(date +%s)
|
||||
ENDTIME=$(($CURRENT_TIME + 300))
|
||||
CATALOG_POD=$(kubectl get pods -n "${namespace}" -o yaml | yq -r ".items[] | select(.metadata.name | startswith(\"${packageName}\")) | .metadata.name")
|
||||
while [ $(date +%s) -lt $ENDTIME ]; do
|
||||
if [[ -z "$CATALOG_POD" ]]
|
||||
then
|
||||
CATALOG_POD=$(kubectl get pods -n "${namespace}" -o yaml | yq -r ".items[] | select(.metadata.name | startswith(\"${packageName}\")) | .metadata.name")
|
||||
sleep 10
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
getBundleListFromCatalogSource() {
|
||||
platform="${1}"
|
||||
if [ -z "${platform}" ]; then
|
||||
|
|
@ -511,9 +526,8 @@ getBundleListFromCatalogSource() {
|
|||
exit 1
|
||||
fi
|
||||
packageName=$(getPackageName "${platform}")
|
||||
|
||||
CATALOG_POD=$(kubectl get pods -n "${namespace}" -o yaml | yq -r ".items[] | select(.metadata.name | startswith(\"${packageName}\")) | .metadata.name")
|
||||
kubectl wait --for=condition=ready "pods/${CATALOG_POD}" --timeout=60s -n "${namespace}"
|
||||
# Wait until catalog pod is created in cluster
|
||||
waitCatalogSourcePod
|
||||
|
||||
CATALOG_SERVICE=$(kubectl get service "${packageName}" -n "${namespace}" -o yaml)
|
||||
CATALOG_IP=$(echo "${CATALOG_SERVICE}" | yq -r ".spec.clusterIP")
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ const (
|
|||
DevWorkspaceRoleBindingFile = DevWorkspaceTemplates + "/devworkspace-controller-leader-election-rolebinding.RoleBinding.yaml"
|
||||
DevWorkspaceClusterRoleBindingFile = DevWorkspaceTemplates + "/devworkspace-controller-rolebinding.ClusterRoleBinding.yaml"
|
||||
DevWorkspaceProxyClusterRoleBindingFile = DevWorkspaceTemplates + "/devworkspace-controller-proxy-rolebinding.ClusterRoleBinding.yaml"
|
||||
DevWorkspaceWorkspaceRoutingCRDFile = DevWorkspaceTemplates + "/workspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml"
|
||||
DevWorkspaceWorkspaceRoutingCRDFile = DevWorkspaceTemplates + "/devworkspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml"
|
||||
DevWorkspaceTemplatesCRDFile = DevWorkspaceTemplates + "/devworkspacetemplates.workspace.devfile.io.CustomResourceDefinition.yaml"
|
||||
DevWorkspaceComponentsCRDFile = DevWorkspaceTemplates + "/components.controller.devfile.io.CustomResourceDefinition.yaml"
|
||||
DevWorkspaceCRDFile = DevWorkspaceTemplates + "/devworkspaces.workspace.devfile.io.CustomResourceDefinition.yaml"
|
||||
|
|
|
|||
Loading…
Reference in New Issue