shy-evening-51366
12/09/2025, 8:23 AM@task(
container_image=<ray_image>,
requests=Resources(mem="2Gi", cpu="1"),
task_config=RayJobConfig(
worker_node_config=[WorkerNodeConfig(group_name="ray-group", replicas=1)],
)
secret_requests=[
Secret(
group="super-secrets",
key="foo",
mount_requirement=Secret.MountType.ENV_VAR,
)
],
)
def test_get_secret():
# Would expect to see _FSEC_SUPER-SECRETS_FOO here, but does not exist.
print(os.environ)
Also tried adding runtime_env to the RayJobConfig but that ends up being empty because I assume the secret is populated at runtime, not at registration time:
runtime_env={
"env_vars": {
"FOO": os.environ.get("_FSEC_SUPER-SECRETS_FOO", "")
}
},echoing-account-76888
12/09/2025, 11:26 AMshy-evening-51366
12/09/2025, 11:31 AMechoing-account-76888
12/09/2025, 11:34 AMshy-evening-51366
12/09/2025, 11:37 AMtask_config=RayJobConfig(ā¦) from the @task decorator it works fine. Appreciate it!shy-evening-51366
12/09/2025, 1:23 PMsecret_requests (or if someone can confirm this is simply not possible today š)freezing-airport-6809
shy-evening-51366
12/09/2025, 4:15 PMechoing-account-76888
12/10/2025, 2:15 AMPodSpec for us? The env var should be in the pod spec environment section