@@ -255,6 +255,16 @@ func (c *Cluster) Install(ctx context.Context) error {
255
255
return err
256
256
}
257
257
258
+ if env .kwokctlConfig .Options .JaegerPort != 0 {
259
+ err = c .setupPorts (ctx ,
260
+ env .usedPorts ,
261
+ & env .kwokctlConfig .Options .JaegerOtlpGrpcPort ,
262
+ )
263
+ if err != nil {
264
+ return err
265
+ }
266
+ }
267
+
258
268
err = c .addEtcd (ctx , env )
259
269
if err != nil {
260
270
return err
@@ -327,6 +337,11 @@ func (c *Cluster) addEtcd(ctx context.Context, env *env) (err error) {
327
337
return err
328
338
}
329
339
340
+ otlpGrpcAddress := ""
341
+ if conf .JaegerOtlpGrpcPort != 0 {
342
+ otlpGrpcAddress = net .LocalAddress + ":" + format .String (conf .JaegerOtlpGrpcPort )
343
+ }
344
+
330
345
etcdComponent , err := components .BuildEtcdComponent (components.BuildEtcdComponentConfig {
331
346
Runtime : conf .Runtime ,
332
347
ProjectName : c .Name (),
@@ -339,6 +354,7 @@ func (c *Cluster) addEtcd(ctx context.Context, env *env) (err error) {
339
354
PeerPort : conf .EtcdPeerPort ,
340
355
Verbosity : env .verbosity ,
341
356
QuotaBackendSize : conf .EtcdQuotaBackendSize ,
357
+ OtlpGrpcAddress : otlpGrpcAddress ,
342
358
})
343
359
if err != nil {
344
360
return err
@@ -362,15 +378,7 @@ func (c *Cluster) addKubeApiserver(ctx context.Context, env *env) (err error) {
362
378
}
363
379
364
380
kubeApiserverTracingConfigPath := ""
365
- if conf .JaegerPort != 0 {
366
- err = c .setupPorts (ctx ,
367
- env .usedPorts ,
368
- & conf .JaegerOtlpGrpcPort ,
369
- )
370
- if err != nil {
371
- return err
372
- }
373
-
381
+ if conf .JaegerOtlpGrpcPort != 0 {
374
382
kubeApiserverTracingConfigData , err := k8s .BuildKubeApiserverTracingConfig (k8s.BuildKubeApiserverTracingConfigParam {
375
383
Endpoint : net .LocalAddress + ":" + format .String (conf .JaegerOtlpGrpcPort ),
376
384
})
0 commit comments