Felix Ruess
11/07/2022, 1:30 PMDan Rammer (hamersaw)
11/07/2022, 3:07 PMFelix Ruess
11/07/2022, 3:56 PM/etc
Dan Rammer (hamersaw)
11/07/2022, 4:03 PM@task
decorator and ContainerTask
use the same backend plugin - adding the functionality you request should be VERY similar for both, really just a flytekit side update.Felix Ruess
11/07/2022, 4:10 PMDan Rammer (hamersaw)
11/07/2022, 4:17 PMFelix Ruess
11/07/2022, 4:20 PMDan Rammer (hamersaw)
11/07/2022, 4:23 PMFelix Ruess
11/07/2022, 4:28 PMenv_from
and using a projected volume should also work, I can also try to create minimal examples for thoseDan Rammer (hamersaw)
11/07/2022, 4:34 PMFelix Ruess
11/07/2022, 4:35 PMEduardo Apolinario (eapolinario)
11/09/2022, 9:10 PMFelix Ruess
11/09/2022, 9:12 PMEduardo Apolinario (eapolinario)
11/09/2022, 9:12 PMFelix Ruess
11/10/2022, 6:33 PMEduardo Apolinario (eapolinario)
11/10/2022, 8:53 PMFelix Ruess
11/10/2022, 9:32 PMRahul Mehta
11/13/2022, 11:02 PMnum_threads
in LightGBM (o/w LGBM will incorrectly use the number of cpus on the node to set its internal thread count, as opposed to the cpu allocation for that particular pod). In this particular case, we can likely work around this by setting a Kyverno policy to add those env vars to each pod created in one of the *-development, *-staging, *-production
namespaces, but in general big +1 to addressing this.PodFunctionTask
task & adding the appropriate fix was simpler to unblock short-term.
This was the simplest fix for our usage, but heavy caveat that I'm not sure if this breaks other cases/fully captures all the intended behavior:
container.env = [V1EnvVar(name=key, value=val) for key, val in sdk_default_container.env.items()] + container.env
Felix Ruess
11/15/2022, 5:32 PMEduardo Apolinario (eapolinario)
11/16/2022, 6:42 PMFelix Ruess
11/16/2022, 8:07 PMtask_config
in container_task.py, but that is not enough apparently....Eduardo Apolinario (eapolinario)
11/16/2022, 8:52 PMFelix Ruess
11/16/2022, 9:07 PMgrpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.INTERNAL
details = "json: cannot unmarshal object into Go struct field Container.containers.envFrom of type []v1.EnvFromSource"
debug_error_string = "{"created":"@1668631993.197113078","description":"Error received from peer ipv4:10.0.0.101:443","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"json: cannot unmarshal object into Go struct field Container.containers.envFrom of type []v1.EnvFromSource","grpc_status":13}"
Eduardo Apolinario (eapolinario)
11/16/2022, 10:52 PMFelix Ruess
11/16/2022, 10:55 PMRahul Mehta
11/16/2022, 10:57 PMFelix Ruess
11/16/2022, 11:03 PM@task
decorator and passing pod spec via task_config it seems only some things can be passed/serialized... in my case I would need to mount the secret as file as projected volume to /etc/my_file_name...Eduardo Apolinario (eapolinario)
11/16/2022, 11:10 PMenv_from
should take a list of V1EnvFromSource
Felix Ruess
11/16/2022, 11:16 PMget_k8s_pod
doesn't seem the way to go here...