@@ -240,27 +240,21 @@ def export_env(cluster_name, namespace):
240240
241241 Environment Variables Set:
242242 - RAY_USE_TLS: Enables TLS for Ray.
243+ - RAY_TLS_SERVER_CERT: Path to the TLS server certificate.
244+ - RAY_TLS_SERVER_KEY: Path to the TLS server private key.
243245 - RAY_TLS_CA_CERT: Path to the CA certificate.
246+ - RAY_CLIENT_SKIP_TLS_VERIFY: Skips TLS verification by the client.
244247 """
245- # Assuming logger is configured elsewhere or add basicConfig here for the module
246- # import logging
247- # logger = logging.getLogger(__name__)
248- # logging.basicConfig(level=logging.INFO) # Or use existing logger if available
249-
250248 tls_dir = os .path .join (os .getcwd (), f"tls-{ cluster_name } -{ namespace } " )
251249 os .environ ["RAY_USE_TLS" ] = "1"
252- # os.environ["RAY_TLS_SERVER_CERT"] = os.path.join(tls_dir, "tls.crt") # Client usually doesn't need to present a server cert
253- # os.environ["RAY_TLS_SERVER_KEY"] = os.path.join(tls_dir, "tls.key") # Client usually doesn't need to present a server key
254- if "RAY_TLS_SERVER_CERT" in os .environ :
255- del os .environ ["RAY_TLS_SERVER_CERT" ]
256- if "RAY_TLS_SERVER_KEY" in os .environ :
257- del os .environ ["RAY_TLS_SERVER_KEY" ]
250+ os .environ ["RAY_TLS_SERVER_CERT" ] = os .path .join (tls_dir , "tls.crt" )
251+ os .environ ["RAY_TLS_SERVER_KEY" ] = os .path .join (tls_dir , "tls.key" )
258252 os .environ ["RAY_TLS_CA_CERT" ] = os .path .join (tls_dir , "ca.crt" )
253+ os .environ ["RAY_CLIENT_SKIP_TLS_VERIFY" ] = "1" # Skip verification for E2E
259254
260- # It's better to use a logger instance if this module has one,
261- # otherwise, these prints will go to stdout.
262- # For now, using print for visibility in test logs if logger isn't set up in this exact scope.
255+ # Optional: Add print statements here if you still want to log them for verification
263256 print (f"generate_cert.export_env: RAY_USE_TLS set to: { os .environ .get ('RAY_USE_TLS' )} " )
264257 print (f"generate_cert.export_env: RAY_TLS_CA_CERT set to: { os .environ .get ('RAY_TLS_CA_CERT' )} " )
265258 print (f"generate_cert.export_env: RAY_TLS_SERVER_CERT is: { os .environ .get ('RAY_TLS_SERVER_CERT' )} " )
266259 print (f"generate_cert.export_env: RAY_TLS_SERVER_KEY is: { os .environ .get ('RAY_TLS_SERVER_KEY' )} " )
260+ print (f"generate_cert.export_env: RAY_CLIENT_SKIP_TLS_VERIFY is: { os .environ .get ('RAY_CLIENT_SKIP_TLS_VERIFY' )} " )
0 commit comments