2026-07-26 20:16:30 +02:00
|
|
|
#!/usr/bin/env bash
|
2026-09-21 18:45:47 +02:00
|
|
|
# Read-only checks of the installed Knative substrate.
|
2026-07-26 20:16:30 +02:00
|
|
|
set -euo pipefail
|
2026-09-21 18:45:47 +02:00
|
|
|
root="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
|
source "$root/release-lock.env"
|
2026-07-26 20:16:30 +02:00
|
|
|
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"
|
2026-07-27 07:18:07 +02:00
|
|
|
test "$(kubectl get configmap config-features -n knative-serving -o jsonpath="{.data.kubernetes\\.podspec-init-containers}")" = "enabled"
|
2026-09-21 18:45:47 +02:00
|
|
|
test "$(kubectl get deployment 3scale-kourier-gateway -n kourier-system -o jsonpath="{.spec.template.spec.containers[?(@.name==\"kourier-gateway\")].image}")" = "'"$ENVOY_IMAGE"'"
|
2026-07-26 20:16:30 +02:00
|
|
|
kubectl wait --for=condition=Available deployment --all -n knative-serving --timeout=120s
|
|
|
|
|
kubectl wait --for=condition=Available deployment --all -n kourier-system --timeout=120s'
|
2026-09-21 18:45:47 +02:00
|
|
|
# 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 50m
|
|
|
|
|
knative-serving autoscaler autoscaler 30m
|
|
|
|
|
knative-serving controller controller 30m
|
|
|
|
|
knative-serving webhook webhook 30m
|
|
|
|
|
knative-serving net-kourier-controller controller 30m
|
|
|
|
|
kourier-system 3scale-kourier-gateway kourier-gateway 50m
|
|
|
|
|
LIST
|
|
|
|
|
echo "knative substrate verified"
|