-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: deploy and functest make tasks
This tasks are helpful when working wieh an external Kubernetes cluster. The 'deploy' task installs the bundles and their dependencies, while the 'functest' task runs the function tests against the cluster. Signed-off-by: Nestor Acuna-Blanco <nestor.acuna@ibm.com>
- Loading branch information
1 parent
ac633f2
commit 6634e73
Showing
3 changed files
with
54 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
function latest_version() { | ||
local repo="$1" | ||
curl -s https://api.github.com/repos/kubevirt/${repo}/releases/latest | \ | ||
grep '"tag_name":' | \ | ||
sed -E 's/.*"([^"]+)".*/\1/' | ||
} | ||
|
||
|
||
# Deploying kubevirt | ||
KUBEVIRT_VERSION=$(curl -L https://storage.googleapis.com/kubevirt-prow/devel/release/kubevirt/kubevirt/stable.txt) | ||
KUBEVIRT_NAMESPACE=${1:-kubevirt} | ||
|
||
kubectl apply -n ${KUBEVIRT_NAMESPACE} -f "https://github.com/kubevirt/kubevirt/releases/download/${KUBEVIRT_VERSION}/kubevirt-operator.yaml" | ||
kubectl apply -n ${KUBEVIRT_NAMESPACE} -f "https://github.com/kubevirt/kubevirt/releases/download/${KUBEVIRT_VERSION}/kubevirt-cr.yaml" | ||
|
||
kubectl patch -n ${KUBEVIRT_NAMESPACE} kubevirt kubevirt --type='json' -p '[{ | ||
"op": "add", | ||
"path": "/spec/configuration/developerConfiguration/featureGates/-", | ||
"value": "NUMA", | ||
},{ | ||
"op": "add", | ||
"path": "/spec/configuration/developerConfiguration/featureGates/-", | ||
"value": "GPU", | ||
}]' | ||
|
||
echo "Waiting for Kubevirt to be ready..." | ||
kubectl wait --for=condition=Available --timeout=600s -n ${KUBEVIRT_NAMESPACE} kv/kubevirt | ||
|
||
|
||
# Deploying CDI | ||
CDI_VERSION=$(latest_version "containerized-data-importer") | ||
CDI_NAMESPACE=cdi | ||
|
||
kubectl apply -n ${CDI_NAMESPACE} -f "https://github.com/kubevirt/containerized-data-importer/releases/download/${CDI_VERSION}/cdi-operator.yaml" | ||
kubectl apply -n ${CDI_NAMESPACE} -f "https://github.com/kubevirt/containerized-data-importer/releases/download/${CDI_VERSION}/cdi-cr.yaml" | ||
|
||
echo "Waiting for CDI to be ready..." | ||
kubectl wait --for=condition=Available --timeout=600s -n ${CDI_NAMESPACE} cdi/cdi |