mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 04:34:27 +00:00
ci: k8s: Let kata-deploy take care of the runtimeclasses
By doing this we can test the change done for the daemonset. :-) Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
87568ed985
commit
9d285c6226
@ -72,6 +72,8 @@ function deploy_kata() {
|
|||||||
|
|
||||||
# Enable debug for Kata Containers
|
# Enable debug for Kata Containers
|
||||||
yq write -i "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" 'spec.template.spec.containers[0].env[1].value' --tag '!!str' "true"
|
yq write -i "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" 'spec.template.spec.containers[0].env[1].value' --tag '!!str' "true"
|
||||||
|
# Let the `kata-deploy` script take care of the runtime class creation / removal
|
||||||
|
yq write -i "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" 'spec.template.spec.containers[0].env[4].value' --tag '!!str' "true"
|
||||||
|
|
||||||
if [ "${KATA_HOST_OS}" = "cbl-mariner" ]; then
|
if [ "${KATA_HOST_OS}" = "cbl-mariner" ]; then
|
||||||
yq write -i "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" 'spec.template.spec.containers[0].env[+].name' "HOST_OS"
|
yq write -i "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" 'spec.template.spec.containers[0].env[+].name' "HOST_OS"
|
||||||
@ -87,7 +89,6 @@ function deploy_kata() {
|
|||||||
kubectl apply -f "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml"
|
kubectl apply -f "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml"
|
||||||
fi
|
fi
|
||||||
kubectl -n kube-system wait --timeout=10m --for=condition=Ready -l name=kata-deploy pod
|
kubectl -n kube-system wait --timeout=10m --for=condition=Ready -l name=kata-deploy pod
|
||||||
kubectl apply -f "${tools_dir}/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml"
|
|
||||||
|
|
||||||
echo "Gather information about the nodes and pods after having kata-deploy ready"
|
echo "Gather information about the nodes and pods after having kata-deploy ready"
|
||||||
get_nodes_and_pods_info
|
get_nodes_and_pods_info
|
||||||
@ -100,6 +101,8 @@ function deploy_kata() {
|
|||||||
else
|
else
|
||||||
sleep 60s
|
sleep 60s
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
kubectl get runtimeclass
|
||||||
}
|
}
|
||||||
|
|
||||||
function run_tests() {
|
function run_tests() {
|
||||||
@ -121,6 +124,7 @@ function run_tests() {
|
|||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
platform="${1}"
|
platform="${1}"
|
||||||
|
ensure_yq
|
||||||
|
|
||||||
echo "Gather information about the nodes and pods before cleaning up the node"
|
echo "Gather information about the nodes and pods before cleaning up the node"
|
||||||
get_nodes_and_pods_info "yes"
|
get_nodes_and_pods_info "yes"
|
||||||
@ -145,6 +149,9 @@ function cleanup() {
|
|||||||
kubectl delete ${deploy_spec}
|
kubectl delete ${deploy_spec}
|
||||||
kubectl -n kube-system wait --timeout=10m --for=delete -l name=kata-deploy pod
|
kubectl -n kube-system wait --timeout=10m --for=delete -l name=kata-deploy pod
|
||||||
|
|
||||||
|
# Let the `kata-deploy` script take care of the runtime class creation / removal
|
||||||
|
yq write -i "${tools_dir}/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml" 'spec.template.spec.containers[0].env[4].value' --tag '!!str' "true"
|
||||||
|
|
||||||
sed -i -e "s|quay.io/kata-containers/kata-deploy:latest|${DOCKER_REGISTRY}/${DOCKER_REPO}:${DOCKER_TAG}|g" "${tools_dir}/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml"
|
sed -i -e "s|quay.io/kata-containers/kata-deploy:latest|${DOCKER_REGISTRY}/${DOCKER_REPO}:${DOCKER_TAG}|g" "${tools_dir}/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml"
|
||||||
cat "${tools_dir}/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml"
|
cat "${tools_dir}/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml"
|
||||||
cat "${tools_dir}/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml" | grep "${DOCKER_REGISTRY}/${DOCKER_REPO}:${DOCKER_TAG}" || die "Failed to setup the tests image"
|
cat "${tools_dir}/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml" | grep "${DOCKER_REGISTRY}/${DOCKER_REPO}:${DOCKER_TAG}" || die "Failed to setup the tests image"
|
||||||
@ -153,7 +160,6 @@ function cleanup() {
|
|||||||
|
|
||||||
kubectl delete ${cleanup_spec}
|
kubectl delete ${cleanup_spec}
|
||||||
kubectl delete -f "${tools_dir}/packaging/kata-deploy/kata-rbac/base/kata-rbac.yaml"
|
kubectl delete -f "${tools_dir}/packaging/kata-deploy/kata-rbac/base/kata-rbac.yaml"
|
||||||
kubectl delete -f "${tools_dir}/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete_cluster() {
|
function delete_cluster() {
|
||||||
|
Loading…
Reference in New Issue
Block a user