Skip to content

Commit aa214d6

Browse files
Xunzhuokfswain
authored andcommitted
feat(epp): use kebab-cased flags for epp (kubernetes-sigs#1177)
* feat(epp): use kebab-cased flags for epp Signed-off-by: bitliu <[email protected]> * resolve feedbacks Signed-off-by: bitliu <[email protected]> --------- Signed-off-by: bitliu <[email protected]>
1 parent d735a22 commit aa214d6

File tree

7 files changed

+58
-58
lines changed

7 files changed

+58
-58
lines changed

cmd/bbr/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ import (
4040

4141
var (
4242
grpcPort = flag.Int(
43-
"grpcPort",
43+
"grpc-port",
4444
9004,
4545
"The gRPC port used for communicating with Envoy proxy")
4646
grpcHealthPort = flag.Int(
47-
"grpcHealthPort",
47+
"grpc-health-port",
4848
9005,
4949
"The port used for gRPC liveness and readiness probes")
5050
metricsPort = flag.Int(
51-
"metricsPort", 9090, "The metrics port")
51+
"metrics-port", 9090, "The metrics port")
5252
streaming = flag.Bool(
5353
"streaming", false, "Enables streaming support for Envoy full-duplex streaming mode")
5454
logVerbosity = flag.Int("v", logging.DEFAULT, "number for the log level verbosity")

cmd/epp/runner/runner.go

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -54,89 +54,89 @@ import (
5454

5555
var (
5656
grpcPort = flag.Int(
57-
"grpcPort",
57+
"grpc-port",
5858
runserver.DefaultGrpcPort,
5959
"The gRPC port used for communicating with Envoy proxy")
6060
grpcHealthPort = flag.Int(
61-
"grpcHealthPort",
61+
"grpc-health-port",
6262
runserver.DefaultGrpcHealthPort,
6363
"The port used for gRPC liveness and readiness probes")
6464
metricsPort = flag.Int(
65-
"metricsPort",
65+
"metrics-port",
6666
runserver.DefaultMetricsPort,
6767
"The metrics port")
6868
enablePprof = flag.Bool(
69-
"enablePprof",
69+
"enable-pprof",
7070
runserver.DefaultEnablePprof,
7171
"Enables pprof handlers. Defaults to true. Set to false to disable pprof handlers.")
7272
destinationEndpointHintKey = flag.String(
73-
"destinationEndpointHintKey",
73+
"destination-endpoint-hint-key",
7474
runserver.DefaultDestinationEndpointHintKey,
7575
"Header and response metadata key used by Envoy to route to the appropriate pod. This must match Envoy configuration.")
7676
destinationEndpointHintMetadataNamespace = flag.String(
77-
"DestinationEndpointHintMetadataNamespace",
77+
"destination-endpoint-hint-metadata-namespace",
7878
runserver.DefaultDestinationEndpointHintMetadataNamespace,
7979
"The key for the outer namespace struct in the metadata field of the extproc response that is used to wrap the"+
8080
"target endpoint. If not set, then an outer namespace struct should not be created.")
8181
poolName = flag.String(
82-
"poolName",
82+
"pool-name",
8383
runserver.DefaultPoolName,
8484
"Name of the InferencePool this Endpoint Picker is associated with.")
8585
poolNamespace = flag.String(
86-
"poolNamespace",
86+
"pool-namespace",
8787
runserver.DefaultPoolNamespace,
8888
"Namespace of the InferencePool this Endpoint Picker is associated with.")
8989
refreshMetricsInterval = flag.Duration(
90-
"refreshMetricsInterval",
90+
"refresh-metrics-interval",
9191
runserver.DefaultRefreshMetricsInterval,
9292
"interval to refresh metrics")
9393
refreshPrometheusMetricsInterval = flag.Duration(
94-
"refreshPrometheusMetricsInterval",
94+
"refresh-prometheus-metrics-interval",
9595
runserver.DefaultRefreshPrometheusMetricsInterval,
9696
"interval to flush prometheus metrics")
9797
logVerbosity = flag.Int(
9898
"v",
9999
logging.DEFAULT,
100100
"number for the log level verbosity")
101101
secureServing = flag.Bool(
102-
"secureServing",
102+
"secure-serving",
103103
runserver.DefaultSecureServing,
104104
"Enables secure serving. Defaults to true.")
105105
healthChecking = flag.Bool(
106-
"healthChecking",
106+
"health-checking",
107107
runserver.DefaultHealthChecking,
108108
"Enables health checking")
109109
certPath = flag.String(
110-
"certPath",
110+
"cert-path",
111111
runserver.DefaultCertPath,
112112
"The path to the certificate for secure serving. The certificate and private key files "+
113113
"are assumed to be named tls.crt and tls.key, respectively. If not set, and secureServing is enabled, "+
114114
"then a self-signed certificate is used.")
115115
// metric flags
116116
totalQueuedRequestsMetric = flag.String(
117-
"totalQueuedRequestsMetric",
117+
"total-queued-requests-metric",
118118
runserver.DefaultTotalQueuedRequestsMetric,
119119
"Prometheus metric for the number of queued requests.")
120120
kvCacheUsagePercentageMetric = flag.String(
121-
"kvCacheUsagePercentageMetric",
121+
"kv-cache-usage-percentage-metric",
122122
runserver.DefaultKvCacheUsagePercentageMetric,
123123
"Prometheus metric for the fraction of KV-cache blocks currently in use (from 0 to 1).")
124124
// LoRA metrics
125125
loraInfoMetric = flag.String(
126-
"loraInfoMetric",
126+
"lora-info-metric",
127127
runserver.DefaultLoraInfoMetric,
128128
"Prometheus metric for the LoRA info metrics (must be in vLLM label format).")
129129
// configuration flags
130130
configFile = flag.String(
131-
"configFile",
131+
"config-file",
132132
runserver.DefaultConfigFile,
133133
"The path to the configuration file")
134134
configText = flag.String(
135-
"configText",
135+
"config-text",
136136
runserver.DefaultConfigText,
137137
"The configuration specified as text, in lieu of a file")
138138

139-
modelServerMetricsPort = flag.Int("modelServerMetricsPort", 0, "Port to scrape metrics from pods. "+
139+
modelServerMetricsPort = flag.Int("model-server-metrics-port", 0, "Port to scrape metrics from pods. "+
140140
"Default value will be set to InferencePool.Spec.TargetPortNumber if not set.")
141141
modelServerMetricsPath = flag.String("modelServerMetricsPath", "/metrics", "Path to scrape metrics from pods")
142142
modelServerMetricsScheme = flag.String("modelServerMetricsScheme", "http", "Scheme to scrape metrics from pods")
@@ -181,8 +181,8 @@ func bindEnvToFlags() {
181181
"POOL_NAME": "poolName",
182182
"POOL_NAMESPACE": "poolNamespace",
183183
// durations & bools work too; flag.Set expects the *string* form
184-
"REFRESH_METRICS_INTERVAL": "refreshMetricsInterval",
185-
"SECURE_SERVING": "secureServing",
184+
"REFRESH_METRICS_INTERVAL": "refresh-metrics-interval",
185+
"SECURE_SERVING": "secure-serving",
186186
} {
187187
if v := os.Getenv(env); v != "" {
188188
// ignore error; Parse() will catch invalid values later

config/charts/body-based-routing/templates/bbr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ spec:
1818
image: {{ .Values.bbr.image.hub }}/{{ .Values.bbr.image.name }}:{{ .Values.bbr.image.tag }}
1919
imagePullPolicy: {{ .Values.bbr.image.pullPolicy | default "Always" }}
2020
args:
21-
- "-streaming"
22-
- "-v"
21+
- "--streaming"
22+
- "--v"
2323
- "3"
2424
ports:
2525
- containerPort: {{ .Values.bbr.port }}

config/charts/inferencepool/templates/epp-deployment.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,31 @@ spec:
2323
image: {{ .Values.inferenceExtension.image.hub }}/{{ .Values.inferenceExtension.image.name }}:{{ .Values.inferenceExtension.image.tag }}
2424
imagePullPolicy: {{ .Values.inferenceExtension.image.pullPolicy | default "Always" }}
2525
args:
26-
- -poolName
26+
- --pool-name
2727
- {{ .Release.Name }}
28-
- -poolNamespace
28+
- --pool-namespace
2929
- {{ .Release.Namespace }}
3030
- --v
3131
- "{{ .Values.inferenceExtension.logVerbosity | default "3" }}"
3232
- --grpcPort
3333
- "9002"
34-
- -grpcHealthPort
34+
- --grpc-health-port
3535
- "9003"
36-
- -metricsPort
36+
- --metrics-port
3737
- "9090"
38-
- -configFile
38+
- --config-file
3939
- "config/{{ .Values.inferenceExtension.pluginsConfigFile }}"
4040
# https://pkg.go.dev/flag#hdr-Command_line_flag_syntax; space is only for non-bool flags
4141
- "--enablePprof={{ .Values.inferenceExtension.enablePprof }}"
4242
- "--modelServerMetricsPath={{ .Values.inferenceExtension.modelServerMetricsPath }}"
4343
- "--modelServerMetricsScheme={{ .Values.inferenceExtension.modelServerMetricsScheme }}"
4444
- "--modelServerMetricsHttpsInsecureSkipVerify={{ .Values.inferenceExtension.modelServerMetricsHttpsInsecureSkipVerify }}"
4545
{{- if eq (.Values.inferencePool.modelServerType | default "vllm") "triton-tensorrt-llm" }}
46-
- -totalQueuedRequestsMetric
46+
- --total-queued-requests-metric
4747
- "nv_trt_llm_request_metrics{request_type=waiting}"
48-
- -kvCacheUsagePercentageMetric
48+
- --kv-cache-usage-percentage-metric
4949
- "nv_trt_llm_kv_cache_block_metrics{kv_cache_block_type=fraction}"
50-
- -loraInfoMetric
50+
- --lora-info-metric
5151
- "" # Set an empty metric to disable LoRA metric scraping as they are not supported by Triton yet.
5252
{{- end }}
5353
ports:

config/manifests/inferencepool-resources.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,19 @@ spec:
5353
image: registry.k8s.io/gateway-api-inference-extension/epp:v0.5.1
5454
imagePullPolicy: IfNotPresent
5555
args:
56-
- -poolName
56+
- --pool-name
5757
- "vllm-llama3-8b-instruct"
58-
- "-poolNamespace"
58+
- "--pool-namespace"
5959
- "default"
60-
- -v
60+
- --v
6161
- "4"
6262
- --zap-encoder
6363
- "json"
64-
- -grpcPort
64+
- --grpc-port
6565
- "9002"
66-
- -grpcHealthPort
66+
- --grpc-health-port
6767
- "9003"
68-
- "-configFile"
68+
- "--config-file"
6969
- "/config/default-plugins.yaml"
7070
ports:
7171
- containerPort: 9002

conformance/resources/manifests/manifests.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -199,19 +199,19 @@ spec:
199199
image: registry.k8s.io/gateway-api-inference-extension/epp:v0.5.1
200200
imagePullPolicy: IfNotPresent
201201
args:
202-
- -poolName
202+
- --pool-name
203203
- "primary-inference-pool"
204-
- -poolNamespace
204+
- --pool-namespace
205205
- "gateway-conformance-app-backend"
206-
- -v
206+
- --v
207207
- "4"
208208
- --zap-encoder
209209
- "json"
210-
- -grpcPort
210+
- --grpc-port
211211
- "9002"
212-
- -grpcHealthPort
212+
- --grpc-health-port
213213
- "9003"
214-
- "-configFile"
214+
- "--config-file"
215215
- "/config/conformance-plugins.yaml"
216216
ports:
217217
- containerPort: 9002
@@ -293,19 +293,19 @@ spec:
293293
image: registry.k8s.io/gateway-api-inference-extension/epp:v0.5.1
294294
imagePullPolicy: IfNotPresent
295295
args:
296-
- -poolName
296+
- --pool-name
297297
- "secondary-inference-pool"
298-
- -poolNamespace
298+
- --pool-namespace
299299
- "gateway-conformance-app-backend"
300-
- -v
300+
- --v
301301
- "4"
302302
- --zap-encoder
303303
- "json"
304-
- -grpcPort
304+
- --grpc-port
305305
- "9002"
306-
- -grpcHealthPort
306+
- --grpc-health-port
307307
- "9003"
308-
- "-configFile"
308+
- "--config-file"
309309
- "/config/conformance-plugins.yaml"
310310
ports:
311311
- containerPort: 9002

test/testdata/inferencepool-e2e.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@ spec:
5050
image: $E2E_IMAGE
5151
imagePullPolicy: IfNotPresent
5252
args:
53-
- -poolName
53+
- --pool-name
5454
- "vllm-llama3-8b-instruct"
55-
- -poolNamespace
55+
- --pool-namespace
5656
- "$E2E_NS"
57-
- -v
57+
- --v
5858
- "4"
5959
- --zap-encoder
6060
- "json"
61-
- -grpcPort
61+
- --grpc-port
6262
- "9002"
63-
- -grpcHealthPort
63+
- --grpc-health-port
6464
- "9003"
65-
- "-configFile"
65+
- "--config-file"
6666
- "/config/default-plugins.yaml"
6767
ports:
6868
- containerPort: 9002

0 commit comments

Comments
 (0)