Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
tnozicka committed Aug 9, 2024
1 parent db74ccf commit 1475312
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 5 deletions.
43 changes: 43 additions & 0 deletions hack/.ci/run-e2e-openshift-aws.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
#
# Copyright (C) 2023 ScyllaDB
#

set -euExo pipefail
shopt -s inherit_errexit

if [ -z "${ARTIFACTS+x}" ]; then
echo "ARTIFACTS can't be empty" > /dev/stderr
exit 2
fi

source "$( dirname "${BASH_SOURCE[0]}" )/../lib/kube.sh"
source "$( dirname "${BASH_SOURCE[0]}" )/lib/e2e.sh"
parent_dir="$( dirname "${BASH_SOURCE[0]}" )"

trap gather-artifacts-on-exit EXIT

SO_INSTALL_PROMETHEUS_OPERATOR="false"
export SO_INSTALL_PROMETHEUS_OPERATOR

#SO_NODECONFIG_PATH="${SO_NODECONFIG_PATH=./hack/.ci/manifests/cluster/nodeconfig.yaml}"
#export SO_NODECONFIG_PATH
SO_CSI_DRIVER_PATH="${parent_dir}/manifests/namespaces/local-csi-driver/"
export SO_CSI_DRIVER_PATH
SO_SCYLLACLUSTER_STORAGECLASS_NAME="${SO_SCYLLACLUSTER_STORAGECLASS_NAME=scylladb-local-xfs}"
export SO_SCYLLACLUSTER_STORAGECLASS_NAME

SCYLLA_OPERATOR_FEATURE_GATES="${SCYLLA_OPERATOR_FEATURE_GATES:-AllAlpha=true,AllBeta=true}"
export SCYLLA_OPERATOR_FEATURE_GATES

for i in "${!KUBECONFIGS[@]}"; do
KUBECONFIG="${KUBECONFIGS[$i]}" DEPLOY_DIR="${ARTIFACTS}/deploy/${i}" timeout --foreground -v 10m "${parent_dir}/../ci-deploy.sh" "${SO_IMAGE}" &
ci_deploy_bg_pids["${i}"]=$!
done

for pid in "${ci_deploy_bg_pids[@]}"; do
wait "${pid}"
done

KUBECONFIG="${KUBECONFIGS[0]}" apply-e2e-workarounds
KUBECONFIG="${KUBECONFIGS[0]}" run-e2e
15 changes: 10 additions & 5 deletions hack/ci-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ if [[ -z ${1+x} ]]; then
exit 1
fi

SO_INSTALL_PROMETHEUS_OPERATOR="${SO_INSTALL_PROMETHEUS_OPERATOR:-yes}"

ARTIFACTS=${ARTIFACTS:-$( mktemp -d )}
OPERATOR_IMAGE_REF=${1}

Expand All @@ -41,7 +43,9 @@ if [[ -n ${SCYLLA_OPERATOR_FEATURE_GATES+x} ]]; then
yq e --inplace '.spec.template.spec.containers[0].args += "--feature-gates="+ strenv(SCYLLA_OPERATOR_FEATURE_GATES)' "${DEPLOY_DIR}/operator/50_operator.deployment.yaml"
fi

kubectl_create -n=prometheus-operator -f="${DEPLOY_DIR}/prometheus-operator"
if [[ "${SO_INSTALL_PROMETHEUS_OPERATOR}" == "yes" ]]; then
kubectl_create -n=prometheus-operator -f="${DEPLOY_DIR}/prometheus-operator"
fi
kubectl_create -n=haproxy-ingress -f="${DEPLOY_DIR}/haproxy-ingress"
kubectl_create -f "${DEPLOY_DIR}"/cert-manager.yaml

Expand Down Expand Up @@ -85,12 +89,13 @@ kubectl -n=scylla-manager wait --timeout=5m --for='condition=Available=True' scy
kubectl -n scylla-manager rollout status --timeout=5m deployment.apps/scylla-manager
kubectl -n scylla-manager rollout status --timeout=5m deployment.apps/scylla-manager-controller

kubectl -n haproxy-ingress rollout status --timeout=5m deployment.apps/haproxy-ingress
kubectl -n haproxy-ingress rollout status --timeout=5m deployment.apps/haproxy-ingress deploy/ingress-default-backend deploy/prometheus

kubectl wait --for condition=established crd/nodeconfigs.scylla.scylladb.com
kubectl wait --for condition=established crd/scyllaoperatorconfigs.scylla.scylladb.com
kubectl wait --for condition=established crd/scylladbmonitorings.scylla.scylladb.com
kubectl wait --for condition=established $( find "${DEPLOY_DIR}/prometheus-operator/" -name '*.crd.yaml' -printf '-f=%p\n' )

kubectl -n=haproxy-ingress rollout status deploy/haproxy-ingress deploy/ingress-default-backend deploy/prometheus
kubectl -n=prometheus-operator rollout status deploy/prometheus-operator
if [[ "${SO_INSTALL_PROMETHEUS_OPERATOR}" == "yes" ]]; then
kubectl wait --for condition=established $( find "${DEPLOY_DIR}/prometheus-operator/" -name '*.crd.yaml' -printf '-f=%p\n' )
kubectl -n=prometheus-operator rollout status deploy/prometheus-operator
fi

0 comments on commit 1475312

Please sign in to comment.