import{j as _}from"./vendor-react-wBh_31cN.js";import{a as r,b as s}from"./index.esm-CAGtek53.js";import{C as P}from"./callout-BFSXVeMz.js";import{L as a}from"./label-gPWmc6ow.js";import{A as n}from"./ArrayField-DnSSsYNA.js";import{I as L}from"./InjectedEnvVarsPreview-CPNXA8Je.js";const N=new Set(["API_KEY","API_KEY_FILE","SERVING_API_KEY","HOPSWORKS_API_KEY","HADOOP_USER_NAME","LIBHDFS_DEFAULT_USER","LIBHDFS_DEFAULT_FS","LIBHDFS_CLIENT_CERTIFICATE","LIBHDFS_ROOT_CA_BUNDLE","LIBHDFS_CLIENT_KEY","ARROW_LIBHDFS_DIR","HDFS_USER","REST_ENDPOINT","HOPSWORKS_REST_ENDPOINT","HOPSWORKS_PUBLIC_HOST","MATERIAL_DIRECTORY","MATERIALISATION_DIR","SECRETS_DIR","PEMS_DIR","CERTS_DIR","HADOOP_HOME","NAMENODE_PORT","CONDAPATH","IS_KUBE","IS_TLS","BASE_DIR","BASE_ENV","FUSE_DIR","PROJECT_PATH","APP_FILES","APP_FILE","APP_ARGS","APP_DIR","APP_PATH","APP_KIND","APP_BASE_URL_PATH","APP_PORT","STREAMLIT_BASE_URL_PATH","STREAMLIT_PORT","NODE_NAME","LOGS_PATH","PROJECT_ID","PROJECT_NAME","HOPSWORKS_PROJECT_ID","HOPSWORKS_PROJECT_NAME","DEPLOYMENT_ID","DEPLOYMENT_NAME","DEPLOYMENT_VERSION","MODEL_NAME","MODEL_VERSION","MODEL_FILES_PATH","ARTIFACT_FILES_PATH","SCRIPT_PATH","SCRIPT_NAME","IS_PREDICTOR","STORAGE_URI","KAFKA_BROKERS","ELASTIC_ENDPOINT","FEATURE_LOGGER_CLIENT_POOL_SIZE","FEATURE_LOGGER_CLIENT_REQ_TIMEOUT","GRPCPORT","RESTPORT","UVICORN_PORT","FILE_SYSTEM_POLLING_INTERVAL_SECS","ENABLE_BATCHING","PORT","K_SERVICE","K_REVISION","K_CONFIGURATION","IS_PYSPARK_EXECUTOR","SPARK_USER_NAME","SPARK_APPLICATION_ID","SPARK_EXECUTOR_ID","SPARK_EXECUTOR_POD_IP","SPARK_EXECUTOR_POD_NAME","SPARK_RESOURCE_PROFILE_ID","SPARK_DRIVER_BIND_ADDRESS","SPARK_DRIVER_URL","SPARK_CONFIG_DIR","SPARK_CONFIG_DRIVER_POD_NAME","SPARK_CONFIG_DRIVER_HOST","SPARK_JUPYTER_HEADLESS_SERVICE_NAME","RAY_CLUSTER_START_WAIT_TIME_SECONDS","RAY_CLUSTER_CONFIG_FILE_PATH","CLAUDE_CODE_ENABLE_TELEMETRY","OTEL_METRICS_EXPORTER","OTEL_LOGS_EXPORTER","TRACELOOP_BASE_URL","OTEL_EXPORTER_OTLP_ENDPOINT","OTEL_EXPORTER_OTLP_PROTOCOL","OTEL_EXPORTER_OTLP_TRACES_ENDPOINT","OTEL_EXPORTER_OTLP_TRACES_PROTOCOL"]),o=["HOPS_","HOPSWORKS_","HOPSFS_","AGENT_"],A=new Set(["HOPS_START_TIME","HOPS_END_TIME"]),D=E=>!E||A.has(E)?!1:N.has(E)?!0:o.some(O=>E.startsWith(O)),i="HOPS_",K=({name:E,isDisabled:O,showHopsReservedWarning:I=!0})=>{const{control:t}=r(),S=(s({control:t,name:E})??[]).map(e=>((e==null?void 0:e.key)??"").trim()).filter(Boolean),R=S.filter(D),T=S.filter(e=>!R.includes(e)&&e.toUpperCase().startsWith(i)&&A.has(e));return _.jsxs("div",{children:[_.jsx(a,{className:"mb-1.5 block",children:"Environment variables"}),R.length>0&&_.jsx("div",{className:"mb-2.5",children:_.jsx(P,{type:"error",content:`Reserved environment variable name${R.length>1?"s":""}: ${R.join(", ")}. These are set by the Hopsworks platform (identity/auth, paths, app runtime, Knative/KServe runtime, OpenTelemetry / Claude Code telemetry) and cannot be overridden — the backend will reject this configuration. Names starting with HOPS_, HOPSWORKS_, HOPSFS_, or AGENT_ are also reserved (except HOPS_START_TIME and HOPS_END_TIME which are scheduler-injected and may be overridden).`})}),I&&T.length>0&&_.jsx("div",{className:"mb-2.5",children:_.jsx(P,{type:"warning",content:`You are overriding scheduler-injected variable${T.length>1?"s":""}: ${T.join(", ")}. These are normally set per execution from the schedule's data interval; setting them here replaces the scheduler value for every run of this job.`})}),_.jsx(n,{name:E,fields:[{name:"key",type:"text",placeholder:"KEY",defaultValue:""},{name:"value",type:"text",placeholder:"value",defaultValue:""}],isDisabled:O}),_.jsx(L,{})]})};export{K as E};
