Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement control-plane placement templating #3154

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

1 participant