@@ -52,91 +52,91 @@ import (
52
52
53
53
var (
54
54
grpcPort = flag .Int (
55
- "grpcPort " ,
55
+ "grpc-port " ,
56
56
runserver .DefaultGrpcPort ,
57
57
"The gRPC port used for communicating with Envoy proxy" )
58
58
grpcHealthPort = flag .Int (
59
- "grpcHealthPort " ,
59
+ "grpc-health-port " ,
60
60
runserver .DefaultGrpcHealthPort ,
61
61
"The port used for gRPC liveness and readiness probes" )
62
62
metricsPort = flag .Int (
63
- "metricsPort " ,
63
+ "metrics-port " ,
64
64
runserver .DefaultMetricsPort ,
65
65
"The metrics port" )
66
66
enablePprof = flag .Bool (
67
- "enablePprof " ,
67
+ "enable-pprof " ,
68
68
runserver .DefaultEnablePprof ,
69
69
"Enables pprof handlers. Defaults to true. Set to false to disable pprof handlers." )
70
70
destinationEndpointHintKey = flag .String (
71
- "destinationEndpointHintKey " ,
71
+ "destination-endpoint-hint-key " ,
72
72
runserver .DefaultDestinationEndpointHintKey ,
73
73
"Header and response metadata key used by Envoy to route to the appropriate pod. This must match Envoy configuration." )
74
74
destinationEndpointHintMetadataNamespace = flag .String (
75
- "DestinationEndpointHintMetadataNamespace " ,
75
+ "destination-endpoint-hint-metadata-namespace " ,
76
76
runserver .DefaultDestinationEndpointHintMetadataNamespace ,
77
77
"The key for the outer namespace struct in the metadata field of the extproc response that is used to wrap the" +
78
78
"target endpoint. If not set, then an outer namespace struct should not be created." )
79
79
poolName = flag .String (
80
- "poolName " ,
80
+ "pool-name " ,
81
81
runserver .DefaultPoolName ,
82
82
"Name of the InferencePool this Endpoint Picker is associated with." )
83
83
poolNamespace = flag .String (
84
- "poolNamespace " ,
84
+ "pool-namespace " ,
85
85
runserver .DefaultPoolNamespace ,
86
86
"Namespace of the InferencePool this Endpoint Picker is associated with." )
87
87
refreshMetricsInterval = flag .Duration (
88
- "refreshMetricsInterval " ,
88
+ "refresh-metrics-interval " ,
89
89
runserver .DefaultRefreshMetricsInterval ,
90
90
"interval to refresh metrics" )
91
91
refreshPrometheusMetricsInterval = flag .Duration (
92
- "refreshPrometheusMetricsInterval " ,
92
+ "refresh-prometheus-metrics-interval " ,
93
93
runserver .DefaultRefreshPrometheusMetricsInterval ,
94
94
"interval to flush prometheus metrics" )
95
95
logVerbosity = flag .Int (
96
96
"v" ,
97
97
logging .DEFAULT ,
98
98
"number for the log level verbosity" )
99
99
secureServing = flag .Bool (
100
- "secureServing " ,
100
+ "secure-serving " ,
101
101
runserver .DefaultSecureServing ,
102
102
"Enables secure serving. Defaults to true." )
103
103
healthChecking = flag .Bool (
104
- "healthChecking " ,
104
+ "health-checking " ,
105
105
runserver .DefaultHealthChecking ,
106
106
"Enables health checking" )
107
107
certPath = flag .String (
108
- "certPath " ,
108
+ "cert-path " ,
109
109
runserver .DefaultCertPath ,
110
110
"The path to the certificate for secure serving. The certificate and private key files " +
111
111
"are assumed to be named tls.crt and tls.key, respectively. If not set, and secureServing is enabled, " +
112
112
"then a self-signed certificate is used." )
113
113
// metric flags
114
114
totalQueuedRequestsMetric = flag .String (
115
- "totalQueuedRequestsMetric " ,
115
+ "total-queued-requests-metric " ,
116
116
runserver .DefaultTotalQueuedRequestsMetric ,
117
117
"Prometheus metric for the number of queued requests." )
118
118
kvCacheUsagePercentageMetric = flag .String (
119
- "kvCacheUsagePercentageMetric " ,
119
+ "kv-cache-usage-percentage-metric " ,
120
120
runserver .DefaultKvCacheUsagePercentageMetric ,
121
121
"Prometheus metric for the fraction of KV-cache blocks currently in use (from 0 to 1)." )
122
122
// LoRA metrics
123
123
loraInfoMetric = flag .String (
124
- "loraInfoMetric " ,
124
+ "lora-info-metric " ,
125
125
runserver .DefaultLoraInfoMetric ,
126
126
"Prometheus metric for the LoRA info metrics (must be in vLLM label format)." )
127
127
// configuration flags
128
128
configFile = flag .String (
129
- "configFile " ,
129
+ "config-file " ,
130
130
runserver .DefaultConfigFile ,
131
131
"The path to the configuration file" )
132
132
configText = flag .String (
133
- "configText " ,
133
+ "config-text " ,
134
134
runserver .DefaultConfigText ,
135
135
"The configuration specified as text, in lieu of a file" )
136
136
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. " +
138
138
"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" )
140
140
141
141
setupLog = ctrl .Log .WithName ("setup" )
142
142
)
@@ -167,16 +167,16 @@ func (r *Runner) WithSchedulerConfig(schedulerConfig *scheduling.SchedulerConfig
167
167
func bindEnvToFlags () {
168
168
// map[ENV_VAR]flagName – add more as needed
169
169
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 " ,
177
177
// 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 " ,
180
180
} {
181
181
if v := os .Getenv (env ); v != "" {
182
182
// ignore error; Parse() will catch invalid values later
0 commit comments