-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
Is your feature request related to a problem? Please describe.
Compose file format is used to define applications for platforms it was not initialy designed for.
- Kubernetes: with https://github.com/kubernetes/kompose and https://github.com/docker/compose-on-kubernetes
- Amazon ECS: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cmd-ecs-cli-compose-parameters.html
While the abstract model of Compose file can be adapted for such platforms, they might miss some specific configuration attributes. To workaround this limitation, a sibling config file might be necessary (see for example https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cmd-ecs-cli-compose-ecsparams.html)
Compose file format do support x-* extension fields. Docker cli use such extension for docker stack deploy command to support kubernetes-specific configuration attributes (pull-policy, pull-secrets, service-type).
But x-* fields are restricted to root and top-level elements only. Platform specific extension should be allowed anywhere, so one can declare custom fields where it makes much sense within Compose model.
Also, x-* are not platform-scoped, which means Platforms A and B could both support some x-magic extension but with a very different effect.
Describe the solution you'd like
- Allow a Compose file to use
x-*extensions everywhere - Recommend use of vendor prefixes, like Docker cli does with
x-kubernetes*
Bonus point : this allows more experimentation with Compose file format, and comparable extensions supported by a significant set of platforms could then be adopted by next iteration of the Compose file format. (the same way CSS browser extensions get adopted)
Describe alternatives you've considered
Additional context