railiance-cluster/install/knative/verify.sh
codex 3b18b84997
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Render rail-knative's HPA caps and 10m CPU requests in the Knative installer (RCLUSTER-WP-0020).
Follow rail-knative 76cb9c7 (RAIL-KNATIVE-WP-0003): overlays set 10m CPU
requests for the six substrate containers and add hpa-caps.patch.yaml
(maxReplicas activator 3, webhook 2, 3scale-kourier-gateway 3); verify.sh
checks both; tests/test_knative_render.py checks overlays, verify.sh, the
rail-knative declaration and the render. Not applied. Adds the receiving
task for wave-2 railiance-cluster allocation (CUST-WP-0071, RESOURCE-WP-0008).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 8340@bnt-lap001
Assistant-Session: 2e192b3d-b3e8-4403-94d4-d55a2c8b476c
2026-10-21 08:43:27 +02:00

37 lines
2.2 KiB
Bash
Executable file

#!/usr/bin/env bash
# Read-only checks of the installed Knative substrate.
set -euo pipefail
root="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$root/release-lock.env"
target="${1:-railiance01}"
ssh "$target" 'set -e
test "$(kubectl get namespace knative-serving -o go-template="{{index .metadata.labels \"app.kubernetes.io/version\"}}")" = "1.22.0"
test "$(kubectl get service kourier -n kourier-system -o jsonpath="{.spec.type}")" = "ClusterIP"
test "$(kubectl get configmap config-network -n knative-serving -o jsonpath="{.data.ingress-class}")" = "kourier.ingress.networking.knative.dev"
test "$(kubectl get configmap config-features -n knative-serving -o jsonpath="{.data.kubernetes\\.podspec-init-containers}")" = "enabled"
test "$(kubectl get deployment 3scale-kourier-gateway -n kourier-system -o jsonpath="{.spec.template.spec.containers[?(@.name==\"kourier-gateway\")].image}")" = "'"$ENVOY_IMAGE"'"
kubectl wait --for=condition=Available deployment --all -n knative-serving --timeout=120s
kubectl wait --for=condition=Available deployment --all -n kourier-system --timeout=120s'
# Declared CPU requests (rail-knative substrate/v1.22.0/cpu-requests.patch.yaml).
while read -r ns deploy container cpu; do
got="$(ssh "$target" kubectl get deployment "$deploy" -n "$ns" \
-o "jsonpath={.spec.template.spec.containers[?(@.name==\"$container\")].resources.requests.cpu}")"
[ "$got" = "$cpu" ] || { echo "cpu request $ns/$deploy/$container: want $cpu, got ${got:-<none>}" >&2; exit 1; }
done <<'LIST'
knative-serving activator activator 10m
knative-serving autoscaler autoscaler 10m
knative-serving controller controller 10m
knative-serving webhook webhook 10m
knative-serving net-kourier-controller controller 10m
kourier-system 3scale-kourier-gateway kourier-gateway 10m
LIST
# Declared HPA ceilings (rail-knative substrate/v1.22.0/hpa-caps.patch.yaml).
while read -r ns hpa max; do
got="$(ssh "$target" kubectl get hpa "$hpa" -n "$ns" -o 'jsonpath={.spec.maxReplicas}')"
[ "$got" = "$max" ] || { echo "hpa maxReplicas $ns/$hpa: want $max, got ${got:-<none>}" >&2; exit 1; }
done <<'HPAS'
knative-serving activator 3
knative-serving webhook 2
kourier-system 3scale-kourier-gateway 3
HPAS
echo "knative substrate verified"