railiance-cluster/install/knative/install.sh
codex 0703e8e1dd
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Install and verify Knative Serving v1.22
2026-07-26 20:16:30 +02:00

24 lines
1.5 KiB
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
root="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$root/release-lock.env"
target="${1:-railiance01}"
stage="$(mktemp -d)"
trap 'rm -rf "$stage"' EXIT
download() {
curl -fsSL --retry 3 "$1" -o "$2"
printf '%s %s\n' "$3" "$2" | sha256sum --check --status
}
serving="https://github.com/knative/serving/releases/download/knative-v${KNATIVE_VERSION}"
kourier="https://github.com/knative-extensions/net-kourier/releases/download/knative-v${KNATIVE_VERSION}"
download "$serving/serving-crds.yaml" "$stage/crds.yaml" "$SERVING_CRDS_SHA256"
download "$serving/serving-core.yaml" "$stage/core.yaml" "$SERVING_CORE_SHA256"
download "$kourier/kourier.yaml" "$stage/kourier.yaml" "$KOURIER_SHA256"
ssh "$target" kubectl apply -f - < "$stage/crds.yaml"
ssh "$target" kubectl apply -f - < "$stage/core.yaml"
ssh "$target" kubectl wait --for=condition=Available deployment --all -n knative-serving --timeout=300s
ssh "$target" kubectl apply -f - < "$stage/kourier.yaml"
ssh "$target" kubectl set image deployment/3scale-kourier-gateway -n kourier-system "kourier-gateway=$ENVOY_IMAGE"
ssh "$target" kubectl patch configmap/config-network -n knative-serving --type merge -p '{"data":{"ingress-class":"kourier.ingress.networking.knative.dev"}}'
ssh "$target" kubectl patch service/kourier -n kourier-system --type merge -p '{"spec":{"type":"ClusterIP"}}'
ssh "$target" kubectl wait --for=condition=Available deployment --all -n kourier-system --timeout=300s