[
https://issues.apache.org/jira/browse/AIRFLOW-5525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16963306#comment-16963306
]
Akshesh Doshi commented on AIRFLOW-5525:
----------------------------------------
This task basically requires to add further parameters provided by docker-py,
the api specifications are here -
[https://docker-py.readthedocs.io/en/stable/api.html]
As an example, let's take TaskTemplate.Placement
([https://docker-py.readthedocs.io/en/stable/api.html#docker.types.TaskTemplate).]
The DockerSwarmOperator already supports some parameters of the TaskTemplate
like container_spec, restart_policy (see
[https://github.com/apache/airflow/pull/5489/files#diff-6cba2b9256f3d84f52b9f9e3dcb72439R109).]
This can be extended to include `Placement` parameter as well.
Same goes for `ContainerSpec` -
[https://github.com/apache/airflow/pull/5489/files#diff-6cba2b9256f3d84f52b9f9e3dcb72439R110.|https://github.com/apache/airflow/pull/5489/files#diff-6cba2b9256f3d84f52b9f9e3dcb72439R110]
> Extra TaskTemplate and ContainerSpec arguments in SwarmOperator
> ---------------------------------------------------------------
>
> Key: AIRFLOW-5525
> URL: https://issues.apache.org/jira/browse/AIRFLOW-5525
> Project: Apache Airflow
> Issue Type: Improvement
> Components: operators
> Affects Versions: 2.0.0
> Reporter: Alister Cordiner
> Priority: Minor
> Labels: Docker, docker, orchestration, swarm
>
> A new {{DockerSwarmOperator}} was added in AIRFLOW-4843. It would be very
> useful to add the ability to pass extra arguments to the {{TaskTemplate}} and
> {{ContainerSpec}}. For example, it would be handy to be able to specify
> labels and placement constraints.
> In particular, the following would be useful for my purposes (but generic
> functionality to add any arguments would also be very useful):
> * {{TaskTemplate.Placement}} - Placement constraints
> * {{TaskTemplate.Resources}} - Memory limits and reservations
> * {{ContainerSpec.labels}} - Container labels
--
This message was sent by Atlassian Jira
(v8.3.4#803005)