feat(kubernetes): support direct Deployment images - #1098
Conversation
|
I wonder if we can use |
0820c74 to
60860f5
Compare
| Effect.provide([NodeFileSystem.layer, Path.layer]), | ||
| Effect.provideService(Stack, unitStack), | ||
| Effect.provideService(Stage, unitStack.stage), | ||
| Effect.provideService(InstanceId, "0123456789abcdef0123456789abcdef"), |
There was a problem hiding this comment.
Build and provide a single Layer, don't use subsequent Effect.provide*
Even in tests because otherwise we pollute context
There was a problem hiding this comment.
Addressed in c2be7e6: the test now composes NodeFileSystem, Path, Stack, Stage, and InstanceId with one Layer.mergeAll(...) and provides that layer in a single Effect.provide(...).
60860f5 to
d3f96df
Compare
|
I checked Here the pod is intentionally pulling through an in-cluster AWS layer cache which obtains short-lived GAR credentials via projected EKS OIDC -> GCP WIF. The deploy host neither has nor should need that registry auth or Docker. The missing capability is specifically for I also tightened the latest revision so this option is Deployment-only internally as well as in the public type; untyped Happy to adjust the API spelling if you prefer something like |
d3f96df to
c2be7e6
Compare
Summary
imageStrategy: "direct"mode for pre-builtKubernetes.Deploymentimagesregistryunstable during direct/mirror transitions so plans do not retain stale attributesWhy
Some EKS workloads pull from registries that already provide their own authentication and caching path. Mirroring those images through ECR forces the deploy machine to pull/tag/push through local Docker and prevents a transparent in-cluster registry cache from owning the data path.
This keeps mirroring backward-compatible while allowing an explicit direct reference:
On a mirrored-to-direct transition, cleanup happens only after Kubernetes reports the rollout complete (new replicas updated and available, no old replicas remaining).
Verification
bun tsc --noEmit -p packages/alchemy/tsconfig.json --pretty falsebun run test test/Kubernetes/Deployment.test.ts(5 passed, 2 slow E2E tests skipped)