Skip to content

Implement control-plane placement templating#3154

Draft
semtexzv wants to merge 1 commit intomoby:masterfrom
semtexzv:templating
Draft

Implement control-plane placement templating#3154
semtexzv wants to merge 1 commit intomoby:masterfrom
semtexzv:templating

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.

Signed-off-by: Michal Hornický <semtexzv@gmail.com>
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