Skip to content

Commit 2576e29

Browse files
authored
Merge pull request #27 from kurtosis-tech/bbusa/tolerations
feat: add tolerations
2 parents 9c18603 + 6ebc34f commit 2576e29

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main.star

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def run(
3333
min_memory=POSTGRES_MIN_MEMORY,
3434
max_memory=POSTGRES_MAX_MEMORY,
3535
node_selectors=None,
36+
tolerations=None,
3637
):
3738
"""Launches a Postgresql database instance, optionally seeding it with a SQL file script
3839
@@ -55,6 +56,7 @@ def run(
5556
max_memory (int): Define how much MB of memory the service should be assigned max.
5657
node_selectors (dict[string, string]): Define a dict of node selectors - only works in kubernetes example: {"kubernetes.io/hostname": node-name-01}
5758
Returns:
59+
tolerations (list[dict]): A list of tolerations to apply to the service. This is only used in Kubernetes.
5860
An object containing useful information about the Postgres database running inside the enclave:
5961
```
6062
{
@@ -99,6 +101,8 @@ def run(
99101
env_vars["PGDATA"] = DATA_DIRECTORY_PATH + "/pgdata"
100102
if node_selectors == None:
101103
node_selectors = {}
104+
if tolerations == None:
105+
tolerations = []
102106
if config_file_artifact_name != "":
103107
config_filepath = CONFIG_FILE_MOUNT_DIRPATH + "/" + CONFIG_FILENAME
104108
cmd += ["-c", "config_file=" + config_filepath]
@@ -130,6 +134,7 @@ def run(
130134
min_memory=min_memory,
131135
max_memory=max_memory,
132136
node_selectors=node_selectors,
137+
tolerations=tolerations,
133138
),
134139
)
135140

0 commit comments

Comments
 (0)