zuul-operator/tools/restart.sh
Jan Gutter c74b147fe7
CI Fixes and dependency updates
These are mostly CI fixes:

* Use podman+cri-o based minikube:
  * This is still considered experimental, but seems to be
    more supported than the 'none' driver.
* Fix an issue where ssh to the emulated static node fails:
  * PAM needed to be disabled for openssh
  * openssh needs more permissions to run - cri-o based minikube
    is more strict
* Rebase test container to Fedora 40
* Update the ingress definition to current API version
* Update zookeeper from 3.5.5 to 3.8.4:
  * required for nodepool 9.0.0+
* Update the percona operator from 1.11 to 1.14:
  * required for kubernetes 1.24+
* Update test node to Ubuntu Jammy from Ubuntu Bionic
* Update minikube to 1.33.1
* Added some more explicit logging to the k8s state, this
  could be split off into a role in future.

Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/924970

Change-Id: I7bf27750073fa807069af6f85f2689173b278abe
2024-08-15 10:25:39 +01:00

76 lines
2.2 KiB
Bash
Executable File

#!/bin/bash
# Copyright 2021 Acme Gating, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
KIND="${KIND:-kind}"
KUBECTL="${KUBECTL:-kubectl}"
DOCKER="${DOCKER:-docker}"
$KIND delete cluster
$KIND create cluster --config kind.yaml
HEAVY=true
common_images=(
docker.io/library/zookeeper:3.8.4
quay.io/jetstack/cert-manager-cainjector:v1.2.0
quay.io/jetstack/cert-manager-controller:v1.2.0
quay.io/jetstack/cert-manager-webhook:v1.2.0
docker.io/jettech/kube-webhook-certgen:v1.5.1
docker.io/zuul/zuul-web:latest
docker.io/zuul/zuul-scheduler:latest
docker.io/zuul/zuul-executor:latest
docker.io/zuul/zuul-preview:latest
docker.io/zuul/zuul-registry:latest
)
heavy_images=(
docker.io/percona/percona-xtradb-cluster-operator:1.7.0
docker.io/percona/percona-xtradb-cluster-operator:1.7.0-haproxy
docker.io/percona/percona-xtradb-cluster-operator:1.7.0-logcollector
docker.io/percona/percona-xtradb-cluster:8.0.21-12.1
docker.io/library/percona:8.0
quay.io/containers/podman:latest
)
light_images=(
docker.io/library/mariadb:focal
)
for img in "${common_images[@]}"; do
$DOCKER image inspect "${img}" >/dev/null || $DOCKER pull "${img}"
$KIND load docker-image "${img}" &
done
if [[ $HEAVY = "true" ]]; then
for img in "${heavy_images[@]}"; do
$DOCKER image inspect "${img}" >/dev/null || $DOCKER pull "${img}"
$KIND load docker-image "${img}" &
done
else
for img in "${light_images[@]}"; do
$DOCKER image inspect "${img}" >/dev/null || $DOCKER pull "${img}"
$KIND load docker-image "${img}" &
done
fi
$KIND load docker-image docker.io/zuul/zuul-operator:latest
$KUBECTL apply -f ingress.yaml &
echo "Waiting"
wait
echo "Done"