Wave-2 right-sizing and inter-hub removal (RAPPS-WP-0018, CSOC-WP-0017, REUSE-WP-0026)

- coulomb-social: requests 100m/256Mi -> 15m/176Mi (limits unchanged)
- reuse-surface: main 100m/256Mi -> 5m/64Mi, landing 10m/32Mi -> 5m/16Mi
- vergabe-demo-company: memory request 256Mi -> 512Mi, CPU 60m kept
- inter-hub (retired, CORE-WP-0007): delete chart, values, Make targets,
  smoke script and production deploy workflow; release to be uninstalled

Full renders vs live: resources only, except the vergabe release-unit label
from 64530e1 not yet on its Service and PVCs.

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

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 276069@bnt-lap001
Assistant-Session: 2e192b3d-b3e8-4403-94d4-d55a2c8b476c
This commit is contained in:
tegwick 2026-10-22 00:03:48 +02:00
parent 1dd7387cbc
commit b7fb7b226f
18 changed files with 41 additions and 426 deletions

View file

@ -1,87 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
base_url="${INTER_HUB_BASE_URL:-https://hub.coulomb.social}"
base_url="${base_url%/}"
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
request() {
local name="$1"
local url="$2"
local expected_status="$3"
local body="$tmpdir/${name}.json"
local status
status="$(curl -sS -o "$body" -w "%{http_code}" "$url")"
if [[ "$status" != "$expected_status" ]]; then
echo "ERROR: expected $url to return $expected_status, got $status" >&2
cat "$body" >&2
echo >&2
exit 1
fi
echo "$body"
}
hubs_body="$(request hubs "${base_url}/api/v2/hubs" 200)"
python3 - "$hubs_body" <<'PY'
import json
import sys
with open(sys.argv[1], encoding="utf-8") as fh:
payload = json.load(fh)
if not isinstance(payload, dict) or not isinstance(payload.get("data"), list):
raise SystemExit("/api/v2/hubs did not return a paginated data list")
print("ok: /api/v2/hubs returned public discovery JSON")
PY
widgets_body="$(request widgets "${base_url}/api/v2/widgets" 401)"
hub_registry_body="$(request hub-registry "${base_url}/api/v2/hub-registry" 401)"
python3 - "$widgets_body" "$hub_registry_body" <<'PY'
import json
import sys
for path, filename in (
("/api/v2/widgets", sys.argv[1]),
("/api/v2/hub-registry", sys.argv[2]),
):
with open(filename, encoding="utf-8") as fh:
payload = json.load(fh)
code = payload.get("code") if isinstance(payload, dict) else None
if code != "invalid_api_key":
raise SystemExit(f"{path} returned 401 but not invalid_api_key JSON")
print(f"ok: {path} requires an API key")
PY
openapi_body="$(request openapi "${base_url}/api/v2/openapi.json" 200)"
python3 - "$openapi_body" <<'PY'
import json
import sys
required_paths = {
"/hubs",
"/hub-capability-manifests",
"/api-consumers",
"/policy-scopes",
"/widgets",
"/hub-registry",
}
with open(sys.argv[1], encoding="utf-8") as fh:
payload = json.load(fh)
paths = payload.get("paths")
if not isinstance(paths, dict):
raise SystemExit("/api/v2/openapi.json did not include an OpenAPI paths object")
missing = sorted(required_paths - set(paths))
if missing:
raise SystemExit("OpenAPI missing paths: " + ", ".join(missing))
print("ok: /api/v2/openapi.json lists expected v2 resources")
PY

View file

@ -8,11 +8,6 @@ VERGABE_RELEASE="${VERGABE_RELEASE:-vergabe-teilnahme}"
VERGABE_NAMESPACE="${VERGABE_NAMESPACE:-vergabe-teilnahme}"
VERGABE_CHART="${VERGABE_CHART:-charts/vergabe-teilnahme}"
VERGABE_VALUES="${VERGABE_VALUES:-helm/vergabe-teilnahme-values.yaml}"
INTER_HUB_RELEASE="${INTER_HUB_RELEASE:-inter-hub}"
INTER_HUB_NAMESPACE="${INTER_HUB_NAMESPACE:-inter-hub}"
INTER_HUB_CHART="${INTER_HUB_CHART:-charts/inter-hub}"
INTER_HUB_VALUES="${INTER_HUB_VALUES:-helm/inter-hub-values.yaml}"
INTER_HUB_IMAGE_TAG="${INTER_HUB_IMAGE_TAG:-}"
DRY_RUN_CREATE_NAMESPACES="${DRY_RUN_CREATE_NAMESPACES:-false}"
for cmd in kubectl helm; do
@ -33,33 +28,18 @@ fi
if [[ "$DRY_RUN_CREATE_NAMESPACES" == "true" ]]; then
echo "server dry-run: ensuring namespace $VERGABE_NAMESPACE exists"
kubectl create namespace "$VERGABE_NAMESPACE" --dry-run=client -o yaml | kubectl apply -f -
echo "server dry-run: ensuring namespace $INTER_HUB_NAMESPACE exists"
kubectl create namespace "$INTER_HUB_NAMESPACE" --dry-run=client -o yaml | kubectl apply -f -
fi
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
inter_hub_image_args=()
if [[ -n "$INTER_HUB_IMAGE_TAG" ]]; then
inter_hub_image_args=(--set "image.tag=$INTER_HUB_IMAGE_TAG")
fi
helm template "$VERGABE_RELEASE" "$VERGABE_CHART" \
--namespace "$VERGABE_NAMESPACE" \
-f "$VERGABE_VALUES" \
> "$tmpdir/vergabe-teilnahme.yaml"
helm template "$INTER_HUB_RELEASE" "$INTER_HUB_CHART" \
--namespace "$INTER_HUB_NAMESPACE" \
-f "$INTER_HUB_VALUES" \
"${inter_hub_image_args[@]}" \
> "$tmpdir/inter-hub.yaml"
echo "server dry-run: committed manifests"
kubectl apply --dry-run=server -f manifests
echo "server dry-run: rendered $VERGABE_RELEASE chart"
kubectl apply --dry-run=server -n "$VERGABE_NAMESPACE" -f "$tmpdir/vergabe-teilnahme.yaml"
echo "server dry-run: rendered $INTER_HUB_RELEASE chart"
kubectl apply --dry-run=server -n "$INTER_HUB_NAMESPACE" -f "$tmpdir/inter-hub.yaml"