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

Commit 59e16d5

Browse files
authored
feat: additional parameter files (#456)
* feat: additional parameter files * chore: cleanup and merge * chore: typo & formatting
1 parent 92fad41 commit 59e16d5

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

libs/python/btp_cli.py

+9
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,15 @@ def create_environments(self):
724724
self.create_and_assign_quota_plan(environment)
725725

726726
elif environment.name == "kymaruntime":
727+
# Support load via dynamic parameter file as well
728+
if environment.parameters is None:
729+
# try via serviceparameter file
730+
command = f'cat "{environment.serviceparameterfile}"'
731+
message = "Read out environment parameter file"
732+
environment.parameters = runCommandAndGetJsonResult(
733+
self, command, "INFO", message
734+
)
735+
727736
kymaClusterName = environment.parameters["name"]
728737

729738
# Set Cluster region: the cluster region can be globally defined via the parameters file

libs/python/helperEnvBTP.py

+2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ def create_btp_service(btpUsecase, service):
7070

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

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

0 commit comments

Comments
 (0)