Zachary Carrico
07/28/2022, 6:10 PMremote.execute(
workflow,
inputs=inputs,
options=Options(labels=common_models.Labels({"flyte.user": os.getenv("USER", "na")}))
where remote
is of type FlyteRemote
.
I can see that the workflow’s pod has the expected label, but none of the subworkflows do. Is there a way to have all pod labels be passed to all child pods of a workflow pod?Dan Rammer (hamersaw)
07/28/2022, 8:29 PMZachary Carrico
07/28/2022, 8:42 PMDan Rammer (hamersaw)
08/02/2022, 6:03 PMFabian Baier
08/02/2022, 6:07 PMapp
as a label when creating the pods https://github.com/flyteorg/flytepropeller/blob/master/manager/manager.go#L91-L93 ?Dan Rammer (hamersaw)
08/02/2022, 6:54 PMFlyteRemote
commands:
from flytekit.configuration import Config, PlatformConfig
from flytekit.models.common import Labels
from flytekit.remote import FlyteRemote
from flytekit.remote.remote import Options
import os
config = Config.for_endpoint("localhost:8089", insecure=True)
remote = FlyteRemote(config=config)
workflow = remote.fetch_workflow(project="flytesnacks", domain="development", name="core.control_flow.subworkflows.parent_wf", version="v0.3.100")
remote.execute(workflow, inputs={"a": 1}, options=Options(labels=Labels({"flyte.user": os.getenv("USER", "na")})), project="flytesnacks", domain="development")
where the workflow is one of our flytesnacks subworkflow tests I am seeing all the pods (including those launched by the subworkflow) have the correct labels set:
hamersaw@ragnarok:~$ kubectl -n flytesnacks-development get pod fc09411a31e134117aaa-node-t1-parent-0 -o yaml
apiVersion: v1
kind: Pod
metadata:
labels:
flyte.user: hamersaw
// ...
hamersaw@ragnarok:~$ kubectl -n flytesnacks-development get pod fc09411a31e134117aaa-n1-0-n0-0 -o yaml
apiVersion: v1
kind: Pod
metadata:
labels:
flyte.user: hamersaw
// ...
hamersaw@ragnarok:~$ kubectl -n flytesnacks-development get pod fc09411a31e134117aaa-n1-0-n1-0 -o yaml
apiVersion: v1
kind: Pod
metadata:
labels:
flyte.user: hamersaw
// ...
Zachary Carrico
08/02/2022, 9:49 PMDan Rammer (hamersaw)
08/02/2022, 9:49 PM