feat: make Ray dashboard URL configurable for HTTPS with TLS proxy#2
Open
savitagm wants to merge 4 commits into
Open
feat: make Ray dashboard URL configurable for HTTPS with TLS proxy#2savitagm wants to merge 4 commits into
savitagm wants to merge 4 commits into
Conversation
Add --dashboard-domain-suffix and --dashboard-port operator flags so kuberay can construct HTTPS dashboard URLs for RayClusters that are already fronted by an envoy proxy with TLS certificates. When domainSuffix is set the URL becomes: https://<head-svc>.<namespace>.<domainSuffix>[:<port>] e.g. raycluster-head-svc.my-namespace.svc.example.com:8266 When unset the operator falls back to the original http:// behaviour, preserving full backwards compatibility. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace CLI flags --dashboard-domain-suffix and --dashboard-port with environment variables, keeping GetRayDashboardClientFunc signature unchanged from upstream (mgr, useKubernetesProxy only). Five new env vars (all optional, backwards compatible): KUBERAY_DASHBOARD_DOMAIN_SUFFIX – enables HTTPS dashboard URLs KUBERAY_DASHBOARD_PORT – port for HTTPS URLs KUBERAY_DASHBOARD_TLS_CA_CERT – CA cert for server verification KUBERAY_DASHBOARD_TLS_CLIENT_CERT – client cert for mTLS KUBERAY_DASHBOARD_TLS_CLIENT_KEY – client key for mTLS Also adds emissary injection annotation to operator pod template so mTLS client certs are provisioned automatically at the standard /etc/emissary/certs/client/ paths. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The emissary injection annotation is Datadog-specific infrastructure config and belongs in k8s-resources, not the upstream kuberay chart. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…me override Allows overriding the server name used for TLS certificate verification when the server cert is issued for a different hostname than the one in the dashboard URL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The dashboard URL was hardcoded to
http://, making it impossible for the operator to reach a Ray dashboard served over HTTPS. This change allows operators to configure a custom domain suffix so the dashboard URL is constructed using the head service DNS name, which is the name TLS certificates are typically issued for when a proxy with TLS termination fronts the Ray cluster.Summary
--dashboard-domain-suffixand--dashboard-portoperator flags toConfigurationandmain.goBuildDashboardURLhelper inutil.gothat constructs an HTTPS URL when a domain suffix is configured, falling back to the originalhttp://behaviour when not setGetRayDashboardClientFuncandGetDashboardClientdeployment.yaml,values.yaml) to expose the new configBuildDashboardURLcovering HTTPS and HTTP fallback casesURL format
When
dashboard.domainSuffixis set in values.yaml:The suffix should include any Kubernetes subdomain prefix, e.g.:
Produces:
https://raycluster-head-svc.my-namespace.svc.example.com:8266Backwards compatibility
When
dashboard.domainSuffixis not set (default), the operator behaves exactly as before — plainhttp://URL. No changes required for existing deployments.Test plan
go build ./...passes on release-1.5go test ./controllers/ray/utils/passes — all existing tests green, 7 newTestBuildDashboardURLcases added