fix(installation): add multi-cluster setup for ecs casting - #141
Open
Nageshbansal wants to merge 9 commits into
Open
fix(installation): add multi-cluster setup for ecs casting#141Nageshbansal wants to merge 9 commits into
Nageshbansal wants to merge 9 commits into
Conversation
Nageshbansal
marked this pull request as ready for review
July 22, 2026 11:07
Nageshbansal
force-pushed
the
fix/casting/ecscasting
branch
from
August 6, 2026 13:09
dca1c3e to
0bd60a6
Compare
Nageshbansal
marked this pull request as draft
August 6, 2026 13:12
Nageshbansal
force-pushed
the
fix/casting/ecscasting
branch
from
September 1, 2026 09:30
0bd60a6 to
0585dd5
Compare
Nageshbansal
marked this pull request as ready for review
September 1, 2026 09:34
Nageshbansal
force-pushed
the
feat/runner
branch
2 times, most recently
from
September 3, 2026 15:57
9e86648 to
52024fb
Compare
The casting placed tasks by naming every AWS object it needed. It now finds its cluster, subnets and nodes by the tags the Infrastructure casting stamped on them, so an installation states only which substrate it runs on and the annotations remain for a cluster foundry did not provision. Terraform runs through the terraform runner rather than the casting's own exec. (cherry picked from commit 156012b6c8795ef87cc99ce60f6b255194e9b3a2)
Drops ecs-config-bucket, which no longer exists, fixes the task execution role to map to execution_role_arn, and records that every annotation but the region is an optional override of a tag lookup.
The enricher resolved every annotation in the installation catalog into the lock, so a systemd casting advertised the ecs and eks annotations too, as nine empty keys that mean nothing on a bare-metal host. Each entry carries the mode it applies to; the loop now honours it.
…e templates Each of the cluster, vpc, subnets, security group and two roles arrives from one of two sources: an annotation naming the object, or a derivation. That choice was made inside the templates, three times over, by string-keyed lookups into the annotation map, with the id lists split by template functions and nothing validating what was stated. A Reference now carries one axis resolved, and the casting decides. Templates branch on the resolution rather than on a raw annotation, so no template names an annotation key any more. Two mistakes that used to reach terraform are now refused at forge: an unstated region, which rendered empty into tfvars and died in terraform's own regex, and an id list that is set but names nothing. Naming no infrastructure is the other shape. There is then no substrate to find anything by, so the four axes it would derive have to be stated, and the pour carries no lookup, no claim and no placement constraint. Stateful components still run; nothing pins them to the instance holding their volume. The schema migrator asked for FARGATE capacity in a cluster that registers EC2 container instances, so it could never place. It now runs on the cluster it deploys to, beside the ephemeral pool, and depends on its task definition so terraform defers the run to apply: the data source calls RunTask on every read, and a plan is not the place to migrate a database. The ingester was the only component the enricher never reached, so its OTLP endpoints were missing from the lock while every other casting reported them.
The example sat at the path gen-examples writes to, so every run overwrote the hand-written casting with a bare one that this casting cannot forge. Both examples now sit beside it, hand-written, and reproduce their own pours. They differ only in whether the cluster is named: provisioned/ binds to a substrate and its pour carries eight data sources, the claim chain and a pinned placement for every stateful service; byo/ states each identifier and carries none of the three. The README claimed a module/ layout that no longer exists, config in S3 that is AppConfig, a Fargate migrator that runs on EC2, and role name defaults derived from the substrate rather than the casting. Its structure now follows the other example READMEs.
Terraform writes state into the root module, which is the pour, and that is where it belongs: the installation and the infrastructure are separate roots, so melting one leaves the other's world alone. The casting never said so, and that silence had a cost. A patch can only rewrite a material that exists, so with no backend file there was no supported way to move state to S3 or GCS short of editing a generated tree by hand. backend.tf.json now states the local backend terraform would have defaulted to. It changes no behaviour and exists to be patched over, the same file the infrastructure casting pours for the same reason.
…rizes StartConfigurationSession is authorized against the configuration, not the application that holds it, and IAM matches an ARN literally: a grant on application/X never covers application/X/environment/Y/configuration/Z. Every component's agent was refused, so no component could read its own config. GetLatestConfiguration still takes the whole account because it acts on a session token and has no resource to name.
A task in awsvpc mode takes an elastic network interface from the instance it lands on, and an instance has few. The migrator is short-lived and owns no data, so it runs on Fargate On-Demand and never competes for one with the services that have to be somewhere. On-Demand needs no capacity provider registered on the cluster; only Fargate Spot does. The roles are named on the task definition, so they exist before the task does, but what they are allowed to do arrives separately. A migrator that starts before its execution role can pull an image fails for a reason that has nothing to do with the migration, so the run waits on the policies too, and only on the ones this casting creates.
Nageshbansal
force-pushed
the
fix/casting/ecscasting
branch
from
September 4, 2026 12:25
0585dd5 to
a98d1ae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features
spec.infrastructure.name.backend.tf.jsonso the state location can be patched to a remote backend.provisioned/andbyo/examples.Example
Provisioned (an Infrastructure casting named
foundrystamped the tags):Bring-your-own (every object stated, nothing looked up):
Fixes
Refactors
Tests
Chores
Related: https://github.com/SigNoz/platform-pod/issues/2743