@@ -33,6 +33,7 @@ def run(
33
33
min_memory = POSTGRES_MIN_MEMORY ,
34
34
max_memory = POSTGRES_MAX_MEMORY ,
35
35
node_selectors = None ,
36
+ tolerations = None ,
36
37
):
37
38
"""Launches a Postgresql database instance, optionally seeding it with a SQL file script
38
39
@@ -55,6 +56,7 @@ def run(
55
56
max_memory (int): Define how much MB of memory the service should be assigned max.
56
57
node_selectors (dict[string, string]): Define a dict of node selectors - only works in kubernetes example: {"kubernetes.io/hostname": node-name-01}
57
58
Returns:
59
+ tolerations (list[dict]): A list of tolerations to apply to the service. This is only used in Kubernetes.
58
60
An object containing useful information about the Postgres database running inside the enclave:
59
61
```
60
62
{
@@ -99,6 +101,8 @@ def run(
99
101
env_vars ["PGDATA" ] = DATA_DIRECTORY_PATH + "/pgdata"
100
102
if node_selectors == None :
101
103
node_selectors = {}
104
+ if tolerations == None :
105
+ tolerations = []
102
106
if config_file_artifact_name != "" :
103
107
config_filepath = CONFIG_FILE_MOUNT_DIRPATH + "/" + CONFIG_FILENAME
104
108
cmd += ["-c" , "config_file=" + config_filepath ]
@@ -130,6 +134,7 @@ def run(
130
134
min_memory = min_memory ,
131
135
max_memory = max_memory ,
132
136
node_selectors = node_selectors ,
137
+ tolerations = tolerations ,
133
138
),
134
139
)
135
140
0 commit comments