CI: Rework Cert Manager.

This commit is contained in:
Marco Ebert 2024-01-29 23:31:08 +01:00
parent 77e564d437
commit 96a2440d34
2 changed files with 13 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 add grafana https://grafana.github.io/helm-charts
helm repo update helm repo update
# deploy cert-manager needed for OpenTelemetry collector operator # 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.15.3/cert-manager.yaml
# create observability namespace # create observability namespace
kubectl apply -f https://raw.githubusercontent.com/esigo/nginx-example/main/observability/namespace.yaml kubectl apply -f https://raw.githubusercontent.com/esigo/nginx-example/main/observability/namespace.yaml
# install OpenTelemetry collector operator # install OpenTelemetry collector operator

View file

@ -91,16 +91,18 @@ echo "[dev-env] copying docker images to cluster..."
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes=${KIND_WORKERS} ${REGISTRY}/controller:${TAG} kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes=${KIND_WORKERS} ${REGISTRY}/controller:${TAG}
if [ "${SKIP_CERT_MANAGER_CREATION:-false}" = "false" ]; then 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 echo "[dev-env] deploying cert-manager..."
tar xzf cmctl.tar.gz
chmod +x cmctl # Get OS & platform for downloading cmctl.
./cmctl help os="$(uname -o | tr "[:upper:]" "[:lower:]" | sed "s/gnu\///")"
echo "[dev-env] apply cert-manager ..." platform="$(uname -m | sed "s/aarch64/arm64/;s/x86_64/amd64/")"
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 # Download cmctl. Cannot validate checksum as OS & platform may vary.
kubectl get validatingwebhookconfigurations cert-manager-webhook -ojson | jq '.webhooks[].clientConfig' curl --fail --location "https://github.com/cert-manager/cmctl/releases/download/v2.1.1/cmctl_${os}_${platform}.tar.gz" | tar --extract --gzip cmctl
kubectl get endpoints -n cert-manager cert-manager-webhook
./cmctl check api --wait=2m # Install cert-manager.
./cmctl x install
./cmctl check api --wait 1m
fi fi
echo "[dev-env] running helm chart e2e tests..." echo "[dev-env] running helm chart e2e tests..."