Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions image/cli/mascli/functions/internal/save_config
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export MAS_CONFIGURE_INGRESS=$MAS_CONFIGURE_INGRESS
export MAS_TRUST_DEFAULT_CAS=$MAS_TRUST_DEFAULT_CAS
export OCP_INGRESS_TLS_SECRET_NAME=$OCP_INGRESS_TLS_SECRET_NAME
export MAS_USE_SERVICE_MESH=$MAS_USE_SERVICE_MESH
export MAS_MANUAL_ROUTE_MGMT=$MAS_MANUAL_ROUTE_MGMT

# Additional Config Support
export LOCAL_MAS_CONFIG_DIR=$LOCAL_MAS_CONFIG_DIR
Expand Down
10 changes: 10 additions & 0 deletions python/src/mas/cli/install/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,7 @@ def configMAS(self):
self.configCATrust()
self.configDNSAndCerts()
self.configRoutingMode()
self.configManualRoutesMgmt()
self.configServiceMesh()
self.configSSOProperties()
self.configSpecialCharacters()
Expand Down Expand Up @@ -1015,6 +1016,15 @@ def _checkIngressControllerPermissions(self, controllerName="default"):
logger.warning(f"User may not have permissions to configure IngressController '{controllerName}': {e}")
return False

@logMethodCall
def configManualRoutesMgmt(self) -> None:
if self.showAdvancedOptions:
self.printH1("Configure Routes Manually")
self.printDescription(["Disable automatic route creation."])
self.yesOrNo("Disable Route Creation", "mas_manual_route_mgmt")
else:
self.setParam("mas_manual_route_mgmt", "false")

@logMethodCall
def configServiceMesh(self) -> None:
if self.showAdvancedOptions:
Expand Down
3 changes: 3 additions & 0 deletions python/src/mas/cli/install/argBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ def buildCommand(self) -> str:
if self.getParam("mas_use_service_mesh") != "":
command += f" --servicemesh \"{self.getParam('mas_use_service_mesh')}\"{newline}"

if self.getParam("mas_manual_route_mgmt").lower() == "true":
command += f" --manual-routes{newline}"

if self.getParam("mas_domain") != "":
command += f" --domain \"{self.getParam('mas_domain')}\"{newline}"

Expand Down
9 changes: 9 additions & 0 deletions python/src/mas/cli/install/argParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@ def isValidFile(parser: argparse.ArgumentParser, arg: str) -> str:
help="Configure MAS to use Service Mesh networking (default: false)",
choices=["true", "false"],
)
masAdvancedArgGroup.add_argument(
"--manual-routes",
dest="mas_manual_route_mgmt",
required=False,
action="store_const",
const="true",
default="false",
help="Disable automatic creation of routes.",
)
masAdvancedArgGroup.add_argument(
"--manual-certificates",
required=False,
Expand Down
1 change: 1 addition & 0 deletions python/src/mas/cli/install/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"mas_routing_mode",
"mas_use_service_mesh",
"mas_ingress_controller_name",
"mas_manual_route_mgmt",
"mas_app_settings_server_bundles_size",
"mas_app_settings_default_jms",
"mas_app_settings_persistent_volumes_flag",
Expand Down
3 changes: 3 additions & 0 deletions python/src/mas/cli/install/summarizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ def masSummary(self) -> None:
self.printParamSummary("IngressController Name", "mas_ingress_controller_name")
self.printParamSummary("Configure IngressController", "mas_configure_ingress")

print()
self.printParamSummary("Manual Routes", "mas_manual_route_mgmt")

print()
self.printParamSummary("Use Service Mesh", "mas_use_service_mesh")

Expand Down
2 changes: 2 additions & 0 deletions python/test/install/test_dev_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ def test_install_master_dev_mode_with_path_routing(tmpdir):
# 4. Routing Mode Configuration - Select path-based routing
".*Routing Mode.*": lambda msg: "1", # Select path-based routing
# Note: IngressController selection prompt does NOT appear because there's only one controller
# 5. Manual Routes Configuration - to use manual route configuration
".*Disable Route Creation.*": lambda msg: "y", # Select to use service mesh
# 5. Service Mesh Configuration - to use service mesg
".*Use Service Mesh.*": lambda msg: "y", # Select to use service mesh
# 5. Configure IngressController for path-based routing
Expand Down
3 changes: 3 additions & 0 deletions tekton/src/params/install.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,9 @@
- name: mas_use_service_mesh
type: string
default: ""
- name: mas_manual_route_mgmt
type: string
default: ""
- name: mas_ingress_controller_name
type: string
default: ""
Expand Down
2 changes: 2 additions & 0 deletions tekton/src/pipelines/taskdefs/core/suite-install.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
value: $(params.mas_routing_mode)
- name: mas_use_service_mesh
value: $(params.mas_use_service_mesh)
- name: mas_manual_route_mgmt
value: $(params.mas_manual_route_mgmt)
- name: mas_ingress_controller_name
value: $(params.mas_ingress_controller_name)
- name: mas_manual_cert_mgmt
Expand Down
6 changes: 6 additions & 0 deletions tekton/src/tasks/suite-install.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ spec:
type: string
description: Optional string parameter, either true or false (defaults to false), defines whether the suite will be configured to use redhat service mesh for networking
default: ""
- name: mas_manual_route_mgmt
type: string
description: Optional string parameter, either true or false (defaults to false), defines whether the suite will disable automatic route creation, allowing manual definitiion of routes.
default: ""
- name: mas_ingress_controller_name
type: string
description: Name of the IngressController to use for path-based routing
Expand Down Expand Up @@ -185,6 +189,8 @@ spec:
value: $(params.mas_ingress_controller_name)
- name: MAS_USE_SERVICE_MESH
value: $(params.mas_use_service_mesh)
- name: MAS_MANUAL_ROUTE_MGMT
value: $(params.mas_manual_route_mgmt)
- name: MAS_MANUAL_CERT_MGMT
value: $(params.mas_manual_cert_mgmt)
- name: MAS_TRUST_DEFAULT_CAS
Expand Down
Loading