feat: wire terminal proxy bootstrap - #585
Conversation
Validation summary
Dependency note: this PR depends on agynio/platform-charts#30 landing first and publishing |
Fix updateAddressed the CI failure where What changed:
Validation summary
Lint/status:
Dependency note: agynio/platform-charts#30 remains the required dependency before this PR can be applied successfully because bootstrap still references the new |
|
Updated this PR to remove the rejected enrolled identity JSON roundtrip. Pattern used:
This keeps Terraform/apply.sh out of enrolled identity JSON capture and lets deployment/runtime wiring produce the identity file from the ziti-owned enrollment token. Validation summary:
Dependency note: platform-charts#30 still must land/publish first because this stack references the |
|
Applied the requested docs cleanup.
Validation summary:
Pattern remains unchanged: ziti stack owns the terminal-proxy Ziti identity/enrollment token, platform stack creates a Kubernetes enrollment Secret from ziti remote state using the existing bootstrap enrollment-secret convention, and runtime chart wiring enrolls the identity file from that JWT. |
|
Synced the Terminal Proxy identity readability fix into bootstrap chart values. Change:
Cleanup remains intact: no Validation summary:
|
UpdateFixed the Terminal Proxy init-container CrashLoopBackOff root cause. Root causeThe chown 10001:10001 /var/run/agyn/terminal-proxy-ziti/identity.jsonBecause the init container was non-root, Changes
This keeps the existing bootstrap convention: Ziti stack owns the Test & Lint SummaryCommands run: terraform fmt -recursive -check .
bash -n apply.sh .github/scripts/verify_platform_health.sh
shellcheck apply.sh .github/scripts/verify_platform_health.sh
for stack in deps k8s system routing data ziti platform apps; do terraform -chdir="stacks/${stack}" init -backend=false -input=false && terraform -chdir="stacks/${stack}" validate; done
docker run --rm --user 2171:2171 --entrypoint sh openziti/ziti-cli:2.0.0-pre10 -ec 'mkdir -p /tmp/terminal-proxy-ziti; touch /tmp/terminal-proxy-ziti/identity.json; chown 10001:10001 /tmp/terminal-proxy-ziti/identity.json'
docker run --rm --user 0:0 --entrypoint sh openziti/ziti-cli:2.0.0-pre10 -ec 'mkdir -p /tmp/terminal-proxy-ziti; touch /tmp/terminal-proxy-ziti/identity.json; chown 10001:10001 /tmp/terminal-proxy-ziti/identity.json; chmod 0400 /tmp/terminal-proxy-ziti/identity.json; test "$(stat -c %u:%g /tmp/terminal-proxy-ziti/identity.json)" = "10001:10001"; test "$(stat -c %a /tmp/terminal-proxy-ziti/identity.json)" = "400"'
git diff --checkResults:
Note: I attempted |
e3c5a7f to
a3c712c
Compare
UpdateFixed the latest Root causeTerminal Proxy That matches the recovered evidence: the init container completed far enough for the runtime container to start, then the The CI wait also timed out on Changes
Test & Lint SummaryCommands run: terraform fmt -recursive -check .
bash -n apply.sh .github/scripts/verify_platform_health.sh
shellcheck apply.sh .github/scripts/verify_platform_health.sh
for stack in deps k8s system routing data ziti platform apps; do terraform -chdir="stacks/${stack}" init -backend=false -input=false && terraform -chdir="stacks/${stack}" validate; done
docker run --rm -e TERMINAL_PROXY_TICKET_SIGNING_KEY=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ghcr.io/agynio/terminal-proxy:0.5.11
# expected failure: 32 alphanumeric chars decode as base64 to 24 bytes
timeout 5 docker run --rm -e TERMINAL_PROXY_TICKET_SIGNING_KEY=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ghcr.io/agynio/terminal-proxy:0.5.11
# expected no signing-key validation failure; timed out because service stayed up
helm template terminal-proxy oci://ghcr.io/agynio/charts/agyn-platform --version 0.5.11 --namespace platform -f /tmp/terminal-proxy-values.yaml
helm template runners oci://ghcr.io/agynio/charts/runners --version 0.5.12 --namespace platform -f /tmp/runners-values.yaml
git diff --check
./apply.sh -yResults:
Local full apply note: |
UpdateApplied Emerson's recommended fix path on the existing PR branch. Changes
Test & Lint SummaryCommands run: terraform fmt -recursive -check .
bash -n apply.sh
shellcheck apply.sh
for stack in deps k8s system routing data ziti platform apps; do terraform -chdir="stacks/${stack}" init -backend=false -input=false && terraform -chdir="stacks/${stack}" validate; done
key=$(openssl rand -base64 32); timeout 5 docker run --rm -e TERMINAL_PROXY_TICKET_SIGNING_KEY="$key" ghcr.io/agynio/terminal-proxy:0.5.11
git diff --check
./apply.sh -yResults:
Local full apply note:
The failure occurs in the k8s stack before Kubernetes resources are created, so it does not exercise the Terminal Proxy deployment path locally. |
noa-lucent
left a comment
There was a problem hiding this comment.
Thanks for the Terminal Proxy bootstrap wiring. I found two blocking deployment issues: the Ziti identity is enrolled from a reusable one-time JWT during every pod start instead of mounting a stable enrolled identity Secret, and the external WebSocket URL omits the configured ingress port used by this bootstrap. Requesting changes until those are fixed.
|
Implemented the requested review fixes on this PR branch. Summary:
Validation:
|
|
Pushed a new follow-up commit for the Terminal Proxy review blockers: . This commit hardens the stable identity Secret mount by setting the Secret volume default mode to , so the mounted \ remains read-only while UID/GID \ can read it via the pod . The PR branch now includes the full blocker fix set:
Validation:
|
|
Pushed a new follow-up commit for the Terminal Proxy review blockers: This commit hardens the stable identity Secret mount by setting the Secret volume default mode to The PR branch now includes the full blocker fix set:
Validation:
|
noa-lucent
left a comment
There was a problem hiding this comment.
Re-review complete. The two previous comments are resolved, so I resolved those threads. However, the latest change regresses the deployment model by replacing the dedicated Argo CD/agyn-platform chart deployment with raw Terraform-managed Kubernetes resources for Terminal Proxy. Requesting changes to keep Terminal Proxy deployed through the chart/application while preserving the stable identity Secret fix.
UpdatePushed Companion chart work:
Bootstrap changes:
Validation
CI: bootstrap run https://github.com/agynio/bootstrap/actions/runs/29948898899 is currently in progress on |
noa-lucent
left a comment
There was a problem hiding this comment.
Re-review complete. The previous deployment-model issue is resolved: Terminal Proxy is back under the agyn-platform Argo CD application, while the stable Ziti identity Secret and ingress-port WebSocket fixes remain in place. I also verified the Terraform configurations validate for the ziti, platform, and routing stacks. Approving.
Summary
Implements the bootstrap deployment wiring slice for agynio/architecture#162.
terminal-proxyOpenZiti identity with role attributeterminal-proxy-hostsand exports its enrollment token.agyn-platformchart Terminal Proxy slice.terminal-proxy-ticket-signingSecret andterminal-proxy-ziti-identitySecret for the enrolled identity JSON file.TERMINAL_PROXY_GRPC_TARGET=terminal-proxy:50051.wss://terminal.<base_domain>/terminalIstio route toterminal-proxy.platform.svc.cluster.local:8080.Validation
terraform -chdir=stacks/ziti fmt— passedterraform -chdir=stacks/platform fmt— passedterraform -chdir=stacks/routing fmt— passedterraform -chdir=stacks/ziti init -backend=false— passedterraform -chdir=stacks/ziti validate— passedterraform -chdir=stacks/platform init -backend=false— passedterraform -chdir=stacks/platform validate— passedterraform -chdir=stacks/routing init -backend=false— passedterraform -chdir=stacks/routing validate— passedgit diff --check— passedterraform plan -var='terminal_proxy_ziti_identity_json={}' -refresh=false -out=/tmp/platform.tfplanwas attempted and could not complete in this workspace because local remote state and kubeconfig are not present (stacks/k8s,stacks/system, andstacks/zitistate are missing;../k8s/.kube/agyn-local-kubeconfig.yamldoes not exist). The partial plan confirmed the new Terminal Proxy signing secret and Ziti identity secret resources before provider/state lookup failed.Dependency order
Depends on agynio/platform-charts#30 landing first and publishing
agyn-platformchart0.5.11; this PR references that chart version for the Terminal Proxy application.