akki commented on a change in pull request #17474:
URL: https://github.com/apache/airflow/pull/17474#discussion_r689656767
##########
File path: airflow/providers/docker/operators/docker_swarm.py
##########
@@ -93,13 +93,40 @@ class DockerSwarmOperator(DockerOperator):
Supported only if the Docker engine is using json-file or journald
logging drivers.
The `tty` parameter should be set to use this with Python applications.
:type enable_logging: bool
+ :param configs: List of docker configs to be exposed to the containers of
the swarm service.
+ The configs are ConfigReference objects as per the docker api
+
[https://docker-py.readthedocs.io/en/stable/services.html#docker.models.services.ServiceCollection.create]_
+ :type configs: List[docker.types.ConfigReference]
+ :param secrets: List of docker secrets to be exposed to the containers of
the swarm service.
+ The secrets are SecretReference objects as per the docker
create_service api.
+
[https://docker-py.readthedocs.io/en/stable/services.html#docker.models.services.ServiceCollection.create]_
+ :type secrets: List[docker.types.SecretReference]
+ :param mode: Indicate whether a service should be deployed as a replicated
or global service,
+ and associated parameters
+ :type mode: docker.types.ServiceMode
+ :param networks: List of network names or IDs or NetworkAttachmentConfig
to attach the service to.
+ :type networks: List[Union[str, NetworkAttachmentConfig]]
"""
- def __init__(self, *, image: str, enable_logging: bool = True, **kwargs)
-> None:
+ def __init__(
+ self,
+ *,
+ image: str,
+ enable_logging: bool = True,
+ configs: Optional[List[types.ConfigReference]] = None,
Review comment:
Good point. Maybe better to keep it simple & leave it as is then.
I guess examples are the most useful to beginners, so adding too much
complexity (like Docker sdk code) might make it confusing for them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]