[feature request] Support of Ordered Container Start
Support of Ordered Container Start coming from this new Spec version:
- Issue: https://github.com/score-spec/spec/issues/104
- PR: https://github.com/score-spec/spec/pull/136
The Spec itself is not yet released, the goal is to use the Spec version from this specific branch first: https://github.com/kai-kystverket/spec/tree/feat/add-before-field-to-containers and this needs to integrated in a temporary score-go version with this: https://github.com/score-spec/score-go/issues/118.
depends_on is the essential ingredient here: https://github.com/compose-spec/compose-spec/blob/main/05-services.md#depends_on. Compose supports waiting for started, ready, or completed. However we are inverting the depends_on to be "before". This should be fine.
These should be caught when running score-xyz generate.
- cyclic relationship container-a.before.containers = [container-b]; container-b.before.containers = [container-a]
- unknown links container-a.before.containers = [unknown]
- Some Score implementations may not support any kind of ready field.
containers:
init-one:
...
before:
containers:
- init-two
init-two:
...
before:
containers:
- main
main:
...
containers:
init:
...
before:
ready: complete # implicit default
containers:
- main
sidecar:
...
before:
containers:
- main
ready: started
main:
....
@astromechza, like discussed, let's clarify what we want here, thanks!
JFYI score-go's branch/PR now in place: https://github.com/score-spec/score-go/pull/121