Repository navigation
Load Loop client TLS from Secret Manager - #131
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex (@codex) review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback". |
|
Codex (@codex) review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback". |
Erik Weathers (erikdw)
left a comment
There was a problem hiding this comment.
LGTM. This should release before data-plane#52 and gke-app#26, since gke-app checks for clientTlsSecret support at plan time. One optional docs suggestion inline.
| Deploy compatible API, Brainstore and routed AI Gateway versions first. Keep the | ||
| generated runtime/worker version compatible with those services. For a Standard |
There was a problem hiding this comment.
Could this be a concrete check, to match the plan-time check proposed for gke-app#26? The overlay pins loopRuntime.image.tag to the data-plane module's worker version and is applied last, so after a chart upgrade the runtime silently stays on the old tag. Something like:
helm show values oci://public.ecr.aws/braintrust/helm/braintrust --version <chart-version> | yq '.loopRuntime.image.tag'
yq '.loopRuntime.image.tag' loop-values.yamlIf they differ, upgrade the data-plane module, or pin loop_runtime_options.services_version deliberately.
6223373
|
Codex (@codex) review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback". |
|
/devin review Review scope: this is a forward fix for the shared Loop setup used by module-managed and existing GKE clusters. Target the new installer/Helm-values interface. Preserving the previous app/infra input-output contract and automating migration of old worker-provider/TLS ownership are out of scope; intentional breaking changes should be versioned and documented. Please flag correctness, IAM/TLS, readiness and unsafe resource-handling issues, and keep recommendations small and general. |
|
Codex (@codex) review Review scope: this is a forward fix for the shared Loop setup used by module-managed and existing GKE clusters. Target the new installer/Helm-values interface. Preserving the previous app/infra input-output contract and automating migration of old worker-provider/TLS ownership are out of scope; intentional breaking changes should be versioned and documented. Please flag correctness, IAM/TLS, readiness and unsafe resource-handling issues, and keep recommendations small and general. |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback". |
|
/devin review Please review the latest commit as a v3.0.0 forward fix of the shared installer/Helm-values contract. Legacy app/infra interfaces and automated provider/TLS migration are out of scope. Check correctness, execution recovery, version coordination, IAM/TLS, readiness and safe resource ownership; keep recommendations small and general. |
|
Codex (@codex) review Please review the latest commit as a v3.0.0 forward fix of the shared installer/Helm-values contract. Legacy app/infra interfaces and automated provider/TLS migration are out of scope. Check correctness, execution recovery, version coordination, IAM/TLS, readiness and safe resource ownership; keep recommendations small and general. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback". |
Enabling Loop currently creates a cluster but leaves worker installation and TLS to another deployment. Following the [AWS bootstrap](braintrustdata/terraform-aws-braintrust-data-plane#514), `enable_loop_runtime = true` now runs a pinned Cloud Run installer and retains TLS in Secret Manager. Module-managed and existing GKE clusters share the installer and ready Helm output through `modules/gke-loop-bootstrap`. The installer reuses `loop_runtime_options.installer_service_account_email` (or `deploy_service_account_email`) when supplied; otherwise Terraform creates an account with project-wide `roles/container.admin`. [GKE IAM cannot restrict Kubernetes object access to one cluster](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/access-control). Deployment requires `roles/run.developer`. Fresh projects use built-in DNS roles with writes limited to the private discovery zone. The [app module](braintrustdata/terraform-google-braintrust-gke-app#26) and [direct Helm installs](braintrustdata/helm#131) consume the same configuration without generated keys in Terraform state or Helm values. Runtime secret access is client-only; setup verifies the worker chart checksum and waits for updated workers to be Ready, including OnDelete StatefulSets. This is a data-plane v4.0.0 forward fix of the app/infra contract: release the chart first, then drain and apply infrastructure v4 before app v3; the first bootstrap creates new TLS roots and Loop is unavailable until the app apply. Earlier live smoke passed with automatic and supplied installer identities: native mTLS, rejection without a client certificate, client-only secret access, a no-change plan, and drain-to-zero without TLS rotation. Execution-cycle recovery and version-pin checks also passed in live smoke. A forced-failure smoke test verified that ready outputs require the [specific execution](https://docs.cloud.google.com/run/docs/reference/rest/v2/projects.locations.jobs.executions) to succeed, and that replacing its trigger retries the same configuration.
Loop Runtime on GKE can load client TLS credentials directly from Google Secret Manager using Workload Identity.
Set
loopRuntime.sandbox.clientTlsSecretto a secret version reference to load the bundle into memory and mount it read-only.This supports Terraform-generated bundles and direct Helm deployments without copying private keys into Helm values.
Leaving the setting empty preserves the existing
sandbox-client-tlsKubernetes Secret.sandbox-client-tlsKubernetes Secret mount.The loader tests cover authenticated requests, file permissions, retries, malformed bundles and restarting after read-only files exist.
The public Terraform bootstrap installs workers and retains TLS for this configuration.