@@ -385,6 +385,11 @@ def customizeServerIstioNetworkAccessPoint(server, listen_address):
385385 if istio_readiness_port is None :
386386 return
387387 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+
388393 # readiness probe
389394 _writeIstioNAP (name = 'http-probe' , server = server , listen_address = listen_address ,
390395 listen_port = istio_readiness_port , protocol = 'http' , http_enabled = "true" )
@@ -413,9 +418,12 @@ def customizeServerIstioNetworkAccessPoint(server, listen_address):
413418 model = env .getModel ()
414419 if ssl is not None and 'Enabled' in ssl and ssl ['Enabled' ] == 'true' :
415420 ssl_listen_port = ssl ['ListenPort' ]
421+ if ssl_listen_port is None :
422+ ssl_listen_port = "7002"
416423 elif ssl is None and isSecureModeEnabledForDomain (model ['topology' ]):
417424 ssl_listen_port = "7002"
418425
426+
419427 if ssl_listen_port is not None :
420428 _writeIstioNAP (name = 'https-secure' , server = server , listen_address = listen_address ,
421429 listen_port = ssl_listen_port , protocol = 'https' , http_enabled = "true" )
@@ -445,6 +453,9 @@ def customizeManagedIstioNetworkAccessPoint(template, listen_address):
445453 if istio_readiness_port is None :
446454 return
447455 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
448459 # readiness probe
449460 _writeIstioNAP (name = 'http-probe' , server = template , listen_address = listen_address ,
450461 listen_port = istio_readiness_port , protocol = 'http' , http_enabled = "true" )
@@ -473,6 +484,8 @@ def customizeManagedIstioNetworkAccessPoint(template, listen_address):
473484 model = env .getModel ()
474485 if ssl is not None and 'Enabled' in ssl and ssl ['Enabled' ] == 'true' :
475486 ssl_listen_port = ssl ['ListenPort' ]
487+ if ssl_listen_port is None :
488+ ssl_listen_port = "7002"
476489 elif ssl is None and isSecureModeEnabledForDomain (model ['topology' ]):
477490 ssl_listen_port = "7002"
478491
0 commit comments