feat: support ordered container start using initContainers (#291)#294
feat: support ordered container start using initContainers (#291)#294Abhishek9639 wants to merge 7 commits into
Conversation
a1d4e2a to
c6875e3
Compare
|
Hey @mathieu-benoit, I also added cycle detection and other validations similar to how it's done in score-compose. |
…c#291) Signed-off-by: Abhishek <abhishekup082@gmail.com>
c6875e3 to
9bd557d
Compare
Signed-off-by: Abhishek <abhishekup082@gmail.com>
|
Thanks, let's make sure we review and approve this one score-spec/score-compose#454 first, and we'll all tackle this one then. |
|
Got it, that makes sense. I’ll wait for score-spec/score-compose#454 to be reviewed and approved first, then we can proceed with this one. |
|
@Abhishek9639, now that score-spec/score-compose#454 is approved and merged, anything here to update before our review? |
|
Hi @mathieu-benoit, |
|
Hey @mathieu-benoit, |
Signed-off-by: Abhishek <abhishekup082@gmail.com>
|
Hey @mathieu-benoit, |
Description
This PR adds support for the
beforeproperty in score-k8s by mapping it to Kubernetes nativeinitContainers, as described in #291.Currently score-k8s doesn't handle the
beforefield at all. With this change, containers that declarebeforeentries are automatically classified and placed intospec.initContainersinstead ofspec.containersin the generated manifest.The mapping follows the approach discussed in the issue:
ready: complete→ regular initContainer (runs to completion before main containers start)ready: started→ sidecar initContainer withrestartPolicy: Always(starts before main containers, keeps running)ready: healthy→ rejected with a validation error, since K8s initContainers don't support health-based gating nativelyCloses #291
What does this PR do?
score-gofrom v1.13.0 to v1.15.0 to get theContainerBeforetypesvalidateContainerBefore()function that checks for self-references, unknown containers, cycles, and rejectsready: healthyinitContainersvs regularcontainersbased on theirbeforeentriesTypes of changes
Checklist: