CI: Rework cert-manager installation.

This commit is contained in:
Marco Ebert 2024-01-29 23:31:08 +01:00
parent 0381ddb096
commit da8abcfc2c
2 changed files with 14 additions and 11 deletions

View file

@ -191,7 +191,7 @@ To install the example and collectors run:
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
# deploy cert-manager needed for OpenTelemetry collector operator
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.yaml
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.3/cert-manager.yaml
# create observability namespace
kubectl apply -f https://raw.githubusercontent.com/esigo/nginx-example/main/observability/namespace.yaml
# install OpenTelemetry collector operator

View file

@ -91,16 +91,19 @@ echo "[dev-env] copying docker images to cluster..."
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes=${KIND_WORKERS} ${REGISTRY}/controller:${TAG}
if [ "${SKIP_CERT_MANAGER_CREATION:-false}" = "false" ]; then
curl -fsSL -o cmctl.tar.gz https://github.com/cert-manager/cert-manager/releases/download/v1.11.1/cmctl-linux-amd64.tar.gz
tar xzf cmctl.tar.gz
chmod +x cmctl
./cmctl help
echo "[dev-env] apply cert-manager ..."
kubectl apply --wait -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.yaml
kubectl wait --timeout=30s --for=condition=available deployment/cert-manager -n cert-manager
kubectl get validatingwebhookconfigurations cert-manager-webhook -ojson | jq '.webhooks[].clientConfig'
kubectl get endpoints -n cert-manager cert-manager-webhook
./cmctl check api --wait=2m
echo "[dev-env] deploying cert-manager..."
# Get OS and platform for downloading cmctl.
os="$(uname -o | tr "[:upper:]" "[:lower:]")"
platform="$(uname -m | sed "s/aarch64/arm64/;s/x86_64/amd64/")"
# Download cmctl. Cannot validate checksum since OS and platform may vary.
curl --silent --show-error --fail --location "https://github.com/cert-manager/cert-manager/releases/download/v1.13.3/cmctl-${os}-${platform}.tar.gz" | tar xz cmctl
# Deploy cert-manager.
kubectl create --filename https://github.com/cert-manager/cert-manager/releases/download/v1.13.3/cert-manager.yaml
kubectl rollout status deployment --namespace cert-manager cert-manager --timeout 30s
./cmctl check api --wait 2m
fi
echo "[dev-env] running helm chart e2e tests..."