Skip to content

[RfC] generalize support for custom extensions #7200

@ndeloof

Description

@ndeloof

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.

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

  1. Allow a Compose file to use x-* extensions everywhere
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions