1 | |
2 | |
3 | * Edit Advanced settings |
4 | * |
5 | */ |
6 | export async function main(auth: RT.Qovery, terraformId: string, body: TerraformAdvancedSettings) { |
7 | const url = new URL(`https://api.qovery.com/terraform/${terraformId}/advancedSettings`) |
8 |
|
9 | const response = await fetch(url, { |
10 | method: 'PUT', |
11 | headers: { |
12 | 'Content-Type': 'application/json', |
13 | Authorization: 'Token ' + auth.apiKey |
14 | }, |
15 | body: JSON.stringify(body) |
16 | }) |
17 | if (!response.ok) { |
18 | const text = await response.text() |
19 | throw new Error(`${response.status} ${text}`) |
20 | } |
21 | return await response.json() |
22 | } |
23 |
|
24 | |
25 | |
26 | * This file was automatically generated by json-schema-to-typescript. |
27 | * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, |
28 | * and run json-schema-to-typescript to regenerate this file. |
29 | */ |
30 |
|
31 | export interface TerraformAdvancedSettings { |
32 | |
33 | * define the max timeout for the build |
34 | */ |
35 | 'build.timeout_max_sec'?: number |
36 | |
37 | * define the max cpu resources (in milli) |
38 | */ |
39 | 'build.cpu_max_in_milli'?: number |
40 | |
41 | * define the max ram resources (in gib) |
42 | */ |
43 | 'build.ram_max_in_gib'?: number |
44 | 'build.ephemeral_storage_in_gib'?: number |
45 | |
46 | * define how long in seconds an application is supposed to be stopped gracefully |
47 | */ |
48 | 'deployment.termination_grace_period_seconds'?: number |
49 | |
50 | * Set pod placement on specific Kubernetes nodes labels |
51 | */ |
52 | 'deployment.affinity.node.required'?: { |
53 | [k: string]: string |
54 | } |
55 | |
56 | * Allows you to set an existing Kubernetes service account name |
57 | * |
58 | */ |
59 | 'security.service_account_name'?: string |
60 | |
61 | * Mounts the container's root filesystem as read-only |
62 | * |
63 | */ |
64 | 'security.read_only_root_filesystem'?: boolean |
65 | [k: string]: unknown |
66 | } |
67 |
|