Skip to content

Add documentation for RAY_RUNTIME_ENV_BEARER_TOKEN env var - #60136

Merged
edoakes merged 1 commit into
ray-project:masterfrom
dkhachyan:issue-46833-2
Jan 14, 2026
Merged

edoakes merged 1 commit into
ray-project:masterfrom
dkhachyan:issue-46833-2

Conversation

@dkhachyan

Copy link
Copy Markdown
Contributor

Description

Added documentation about using RAY_RUNTIME_ENV_BEARER_TOKEN_ENV_VAR for authenticating remote URIs in runtime_env

Related issues

#46833

Related PRs

#60050

@dkhachyan
dkhachyan requested review from a team as code owners January 14, 2026 13:56

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds documentation for the RAY_RUNTIME_ENV_BEARER_TOKEN environment variable, which allows authenticating remote URIs in runtime_env using bearer tokens. The documentation is clear and covers both local usage and deployment on KubeRay with Kubernetes secrets. I've suggested a minor improvement to the Kubernetes example to follow common conventions for secret keys, which will enhance clarity for users.

Comment on lines +149 to +150
kubectl create secret generic bearer-token-secret \
--from-literal=RAY_RUNTIME_ENV_BEARER_TOKEN="your_bearer_token_here"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better convention and clarity in Kubernetes, it's recommended to use a simpler key for the secret, like token. The current key RAY_RUNTIME_ENV_BEARER_TOKEN is quite long and unconventional for a secret key. The environment variable inside the pod will still be set correctly.

This change will also require updating the secretKeyRef.key in the KubeRay config YAML in the following code blocks.

Suggested change
kubectl create secret generic bearer-token-secret \
--from-literal=RAY_RUNTIME_ENV_BEARER_TOKEN="your_bearer_token_here"
kubectl create secret generic bearer-token-secret \
--from-literal=token="your_bearer_token_here"

valueFrom:
secretKeyRef:
name: bearer-token-secret
key: RAY_RUNTIME_ENV_BEARER_TOKEN

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To align with the suggested change of using a simpler secret key (token), the key here should be updated.

Suggested change
key: RAY_RUNTIME_ENV_BEARER_TOKEN
key: token

valueFrom:
secretKeyRef:
name: bearer-token-secret
key: RAY_RUNTIME_ENV_BEARER_TOKEN

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To align with the suggested change of using a simpler secret key (token), the key here should be updated.

Suggested change
key: RAY_RUNTIME_ENV_BEARER_TOKEN
key: token

@ray-gardener ray-gardener Bot added usability docs An issue or change related to documentation core Issues that should be addressed in Ray Core community-contribution Contributed by the community labels Jan 14, 2026
@edoakes edoakes added the go add ONLY when ready to merge, run all tests label Jan 14, 2026
@edoakes
edoakes enabled auto-merge (squash) January 14, 2026 22:35
@edoakes
edoakes merged commit ac7b4da into ray-project:master Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community core Issues that should be addressed in Ray Core docs An issue or change related to documentation go add ONLY when ready to merge, run all tests usability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants