Skip to content

Pod affinity not consistently set in argo workflows #696

@filippomc

Description

@filippomc

Affinity is only set for shared volumes in the operation, not set for volume_mounts specification in the task directly

Example:

shared_directory = 'a:b'
task_write = operations.CustomTask('download-file', 'workflows-extract-download',
                                       url='https://raw.githubusercontent.com/openworm/org.geppetto/master/README.md')
op = operations.SingleTaskOperation('test-custom-connected-op-', task_write,
                                        shared_directory=shared_directory, shared_volume_size=100)
wf = op.to_workflow()
task_write = operations.CustomTask('download-file', 'workflows-extract-download', volume_mounts=["a:b"],
                                       url='https://raw.githubusercontent.com/openworm/org.geppetto/master/README.md')
op = operations.SingleTaskOperation('test-custom-connected-op-', task_write, shared_volume_size=100, shared_directory=shared_directory)
wf = op.to_workflow()

Here we expect in both cases to have affinity and labels to match {"usesvolume": "a"} but only the first one works

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions