@@ -52,91 +52,91 @@ import (
5252
5353var (
5454 grpcPort = flag .Int (
55- "grpcPort " ,
55+ "grpc-port " ,
5656 runserver .DefaultGrpcPort ,
5757 "The gRPC port used for communicating with Envoy proxy" )
5858 grpcHealthPort = flag .Int (
59- "grpcHealthPort " ,
59+ "grpc-health-port " ,
6060 runserver .DefaultGrpcHealthPort ,
6161 "The port used for gRPC liveness and readiness probes" )
6262 metricsPort = flag .Int (
63- "metricsPort " ,
63+ "metrics-port " ,
6464 runserver .DefaultMetricsPort ,
6565 "The metrics port" )
6666 enablePprof = flag .Bool (
67- "enablePprof " ,
67+ "enable-pprof " ,
6868 runserver .DefaultEnablePprof ,
6969 "Enables pprof handlers. Defaults to true. Set to false to disable pprof handlers." )
7070 destinationEndpointHintKey = flag .String (
71- "destinationEndpointHintKey " ,
71+ "destination-endpoint-hint-key " ,
7272 runserver .DefaultDestinationEndpointHintKey ,
7373 "Header and response metadata key used by Envoy to route to the appropriate pod. This must match Envoy configuration." )
7474 destinationEndpointHintMetadataNamespace = flag .String (
75- "DestinationEndpointHintMetadataNamespace " ,
75+ "destination-endpoint-hint-metadata-namespace " ,
7676 runserver .DefaultDestinationEndpointHintMetadataNamespace ,
7777 "The key for the outer namespace struct in the metadata field of the extproc response that is used to wrap the" +
7878 "target endpoint. If not set, then an outer namespace struct should not be created." )
7979 poolName = flag .String (
80- "poolName " ,
80+ "pool-name " ,
8181 runserver .DefaultPoolName ,
8282 "Name of the InferencePool this Endpoint Picker is associated with." )
8383 poolNamespace = flag .String (
84- "poolNamespace " ,
84+ "pool-namespace " ,
8585 runserver .DefaultPoolNamespace ,
8686 "Namespace of the InferencePool this Endpoint Picker is associated with." )
8787 refreshMetricsInterval = flag .Duration (
88- "refreshMetricsInterval " ,
88+ "refresh-metrics-interval " ,
8989 runserver .DefaultRefreshMetricsInterval ,
9090 "interval to refresh metrics" )
9191 refreshPrometheusMetricsInterval = flag .Duration (
92- "refreshPrometheusMetricsInterval " ,
92+ "refresh-prometheus-metrics-interval " ,
9393 runserver .DefaultRefreshPrometheusMetricsInterval ,
9494 "interval to flush prometheus metrics" )
9595 logVerbosity = flag .Int (
9696 "v" ,
9797 logging .DEFAULT ,
9898 "number for the log level verbosity" )
9999 secureServing = flag .Bool (
100- "secureServing " ,
100+ "secure-serving " ,
101101 runserver .DefaultSecureServing ,
102102 "Enables secure serving. Defaults to true." )
103103 healthChecking = flag .Bool (
104- "healthChecking " ,
104+ "health-checking " ,
105105 runserver .DefaultHealthChecking ,
106106 "Enables health checking" )
107107 certPath = flag .String (
108- "certPath " ,
108+ "cert-path " ,
109109 runserver .DefaultCertPath ,
110110 "The path to the certificate for secure serving. The certificate and private key files " +
111111 "are assumed to be named tls.crt and tls.key, respectively. If not set, and secureServing is enabled, " +
112112 "then a self-signed certificate is used." )
113113 // metric flags
114114 totalQueuedRequestsMetric = flag .String (
115- "totalQueuedRequestsMetric " ,
115+ "total-queued-requests-metric " ,
116116 runserver .DefaultTotalQueuedRequestsMetric ,
117117 "Prometheus metric for the number of queued requests." )
118118 kvCacheUsagePercentageMetric = flag .String (
119- "kvCacheUsagePercentageMetric " ,
119+ "kv-cache-usage-percentage-metric " ,
120120 runserver .DefaultKvCacheUsagePercentageMetric ,
121121 "Prometheus metric for the fraction of KV-cache blocks currently in use (from 0 to 1)." )
122122 // LoRA metrics
123123 loraInfoMetric = flag .String (
124- "loraInfoMetric " ,
124+ "lora-info-metric " ,
125125 runserver .DefaultLoraInfoMetric ,
126126 "Prometheus metric for the LoRA info metrics (must be in vLLM label format)." )
127127 // configuration flags
128128 configFile = flag .String (
129- "configFile " ,
129+ "config-file " ,
130130 runserver .DefaultConfigFile ,
131131 "The path to the configuration file" )
132132 configText = flag .String (
133- "configText " ,
133+ "config-text " ,
134134 runserver .DefaultConfigText ,
135135 "The configuration specified as text, in lieu of a file" )
136136
137- modelServerMetricsPort = flag .Int ("modelServerMetricsPort " , 0 , "Port to scrape metrics from pods. " +
137+ modelServerMetricsPort = flag .Int ("model-server-metrics-port " , 0 , "Port to scrape metrics from pods. " +
138138 "Default value will be set to InferencePool.Spec.TargetPortNumber if not set." )
139- modelServerMetricsPath = flag .String ("modelServerMetricsPath " , "/metrics" , "Path to scrape metrics from pods" )
139+ modelServerMetricsPath = flag .String ("model-server-metrics-path " , "/metrics" , "Path to scrape metrics from pods" )
140140
141141 setupLog = ctrl .Log .WithName ("setup" )
142142)
@@ -167,16 +167,16 @@ func (r *Runner) WithSchedulerConfig(schedulerConfig *scheduling.SchedulerConfig
167167func bindEnvToFlags () {
168168 // map[ENV_VAR]flagName – add more as needed
169169 for env , flg := range map [string ]string {
170- "GRPC_PORT" : "grpcPort " ,
171- "GRPC_HEALTH_PORT" : "grpcHealthPort " ,
172- "MODEL_SERVER_METRICS_PORT" : "modelServerMetricsPort " ,
173- "MODEL_SERVER_METRICS_PATH" : "modelServerMetricsPath " ,
174- "DESTINATION_ENDPOINT_HINT_KEY" : "destinationEndpointHintKey " ,
175- "POOL_NAME" : "poolName " ,
176- "POOL_NAMESPACE" : "poolNamespace " ,
170+ "GRPC_PORT" : "grpc-port " ,
171+ "GRPC_HEALTH_PORT" : "grpc-health-port " ,
172+ "MODEL_SERVER_METRICS_PORT" : "model-server-metrics-port " ,
173+ "MODEL_SERVER_METRICS_PATH" : "model-server-metrics-path " ,
174+ "DESTINATION_ENDPOINT_HINT_KEY" : "destination-endpoint-hint-key " ,
175+ "POOL_NAME" : "pool-name " ,
176+ "POOL_NAMESPACE" : "pool-namespace " ,
177177 // durations & bools work too; flag.Set expects the *string* form
178- "REFRESH_METRICS_INTERVAL" : "refreshMetricsInterval " ,
179- "SECURE_SERVING" : "secureServing " ,
178+ "REFRESH_METRICS_INTERVAL" : "refresh-metrics-interval " ,
179+ "SECURE_SERVING" : "secure-serving " ,
180180 } {
181181 if v := os .Getenv (env ); v != "" {
182182 // ignore error; Parse() will catch invalid values later
0 commit comments