Skip to content

Pass swarm task information as environment variables into each task #24110

@F21

Description

@F21

I am interested in running HDFS using swarm. One of the requirements of HDFS is a Zookeeper ensemble. To operate a Zookeeper ensemble, each Zookeeper should have a unique ID, starting from 1 and ending in 255.

While it is possible to coordinate the ids using something like consul or etcd, it would be much simpler for swarm to pass in task information as environment variables into each task. For example:

  • SWARM_TASK_ID
  • SWARM_SERVICE_NAME
  • ...

These variables can then be used by the containers to simplify orchestration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/swarmkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions