Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

feat: additional parameter files #456

Merged
merged 3 commits into from
Mar 10, 2023
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
9 changes: 9 additions & 0 deletions libs/python/btp_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,15 @@ def create_environments(self):
self.create_and_assign_quota_plan(environment)

elif environment.name == "kymaruntime":
# Support load via dynamic parameter file as well
if environment.parameters is None:
# try via serviceparameter file
command = f'cat "{environment.serviceparameterfile}"'
message = "Read out environment parameter file"
environment.parameters = runCommandAndGetJsonResult(
self, command, "INFO", message
)

kymaClusterName = environment.parameters["name"]

# Set Cluster region: the cluster region can be globally defined via the parameters file
Expand Down
2 changes: 2 additions & 0 deletions libs/python/helperEnvBTP.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ def create_btp_service(btpUsecase, service):

if service.parameters is not None:
command = command + " --parameters '" + dictToString(service.parameters) + "'"
elif service.serviceparameterfile is not None:
command += f" --parameters {service.serviceparameterfile}"

if service.labels is not None:
command = command + " --labels '" + dictToString(service.labels) + "'"
Expand Down