@@ -385,6 +385,11 @@ def customizeServerIstioNetworkAccessPoint(server, listen_address):
385
385
if istio_readiness_port is None :
386
386
return
387
387
admin_server_port = server ['ListenPort' ]
388
+ # Set the default if it is not provided to avoid nap default to 0 which fails validation.
389
+
390
+ if admin_server_port is None :
391
+ admin_server_port = 7001
392
+
388
393
# readiness probe
389
394
_writeIstioNAP (name = 'http-probe' , server = server , listen_address = listen_address ,
390
395
listen_port = istio_readiness_port , protocol = 'http' , http_enabled = "true" )
@@ -413,9 +418,12 @@ def customizeServerIstioNetworkAccessPoint(server, listen_address):
413
418
model = env .getModel ()
414
419
if ssl is not None and 'Enabled' in ssl and ssl ['Enabled' ] == 'true' :
415
420
ssl_listen_port = ssl ['ListenPort' ]
421
+ if ssl_listen_port is None :
422
+ ssl_listen_port = "7002"
416
423
elif ssl is None and isSecureModeEnabledForDomain (model ['topology' ]):
417
424
ssl_listen_port = "7002"
418
425
426
+
419
427
if ssl_listen_port is not None :
420
428
_writeIstioNAP (name = 'https-secure' , server = server , listen_address = listen_address ,
421
429
listen_port = ssl_listen_port , protocol = 'https' , http_enabled = "true" )
@@ -445,6 +453,9 @@ def customizeManagedIstioNetworkAccessPoint(template, listen_address):
445
453
if istio_readiness_port is None :
446
454
return
447
455
listen_port = template ['ListenPort' ]
456
+ # Set the default if it is not provided to avoid nap default to 0 which fails validation.
457
+ if listen_port is None :
458
+ listen_port = 7001
448
459
# readiness probe
449
460
_writeIstioNAP (name = 'http-probe' , server = template , listen_address = listen_address ,
450
461
listen_port = istio_readiness_port , protocol = 'http' , http_enabled = "true" )
@@ -473,6 +484,8 @@ def customizeManagedIstioNetworkAccessPoint(template, listen_address):
473
484
model = env .getModel ()
474
485
if ssl is not None and 'Enabled' in ssl and ssl ['Enabled' ] == 'true' :
475
486
ssl_listen_port = ssl ['ListenPort' ]
487
+ if ssl_listen_port is None :
488
+ ssl_listen_port = "7002"
476
489
elif ssl is None and isSecureModeEnabledForDomain (model ['topology' ]):
477
490
ssl_listen_port = "7002"
478
491
0 commit comments