Skip to content

Conversation

semtexzv
Copy link

- What I did
First pass on implementing templating of tasks for placement purposes. When combined with multiple nodes nodes labeled like srv=1, srv=2, allows for pinning of individual instances to nodes like so:

services:
  srv:
    deploy:
      replicas: 2
      placement:
        constraints:
          - node.labels.srv=={{Task.Slot}}

- How I did it
Re-uses the most of the existing templating code, not sure about where to template the task struct though.

- How to test it
Actually no idea. Open to suggestions how to make this production-level code instead of an experiment.

- Description for the changelog
Added support for partial templates in placement constraints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant