Skip to content

Add option to get all containers despite running state #9907

Description

@acouvreur

Welcome!

  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you expect to see?

I'd like to have an option such as listAllContainers that would retrieve even dead containers to be routed too.

The point being, to be able to create a loadbalancing against a potential container, whatever its state, middleware can be triggered before.

Plugins such as https://github.com/acouvreur/sablier could benefit of such feature by being able to spin up the container on demand, with relying on specifying the configuration on the dynamic file only. Which seems to be the only alternative right now.

The only change needed being this:
image

And of course, this being the case only when a parameter, such as listAllContainers would be set to true.

At first, I thought that also allowEmptyServices would be able to get this behavior, but since it's been implemented like this for a while now, I'm not sure if the project should do such change anyway.

It's kind of a niche feature, but it could provide very nice extensibility.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions