Skip to content

Commit 310531f

Browse files
Add docs for mandatory env overrides
1 parent 6ce281e commit 310531f

File tree

2 files changed

+45
-39
lines changed

2 files changed

+45
-39
lines changed

docs/reference/api/platform/componenttype.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ type.
4545

4646
Defines the configurable parameters that developers can set when creating components of this type.
4747

48-
| Field | Type | Required | Default | Description |
49-
|----------------|--------|----------|---------|----------------------------------------------------------------|
50-
| `types` | object | No | - | Reusable type definitions referenced in parameters |
51-
| `parameters` | object | No | - | Static parameters exposed to developers (same across all envs) |
52-
| `envOverrides` | object | No | - | Parameters that can be overridden per environment |
48+
| Field | Type | Required | Default | Description |
49+
|----------------|--------|----------|---------|------------------------------------------------------------------------|
50+
| `types` | object | No | - | Reusable type definitions referenced in parameters |
51+
| `parameters` | object | No | - | Static parameters exposed to developers (same across all envs) |
52+
| `envOverrides` | object | Yes | - | Parameters that can be overridden per environment (Must have defaults) |
5353

5454
#### Parameter Schema Syntax
5555

@@ -65,20 +65,23 @@ Supported types: `string`, `integer`, `boolean`, `array<type>`, custom type refe
6565

6666
```yaml
6767
schema:
68-
types:
69-
Resources:
70-
cpu: "string | default=100m"
71-
memory: "string | default=256Mi"
72-
73-
parameters:
74-
replicas: "integer | default=1"
75-
port: "integer | default=8080"
76-
imagePullPolicy: "string | default=IfNotPresent | enum=Always,IfNotPresent,Never"
77-
78-
envOverrides:
79-
resources:
80-
requests: Resources
81-
limits: Resources
68+
types:
69+
ResourceRequirements:
70+
requests: "ResourceQuantity | default={}"
71+
limits: "ResourceQuantity | default={}"
72+
ResourceQuantity:
73+
cpu: "string | default=100m"
74+
memory: "string | default=256Mi"
75+
76+
parameters:
77+
replicas: "integer | default=1"
78+
imagePullPolicy: "string | default=IfNotPresent"
79+
port: "integer | default=80"
80+
exposed: "boolean | default=false"
81+
containerName: "string | default=main"
82+
83+
envOverrides:
84+
resources: "ResourceRequirements | default={}"
8285
```
8386

8487
### ResourceTemplate

versioned_docs/version-v0.5.x/reference/api/platform/componenttype.md

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ type.
4545

4646
Defines the configurable parameters that developers can set when creating components of this type.
4747

48-
| Field | Type | Required | Default | Description |
49-
|----------------|--------|----------|---------|----------------------------------------------------------------|
50-
| `types` | object | No | - | Reusable type definitions referenced in parameters |
51-
| `parameters` | object | No | - | Static parameters exposed to developers (same across all envs) |
52-
| `envOverrides` | object | No | - | Parameters that can be overridden per environment |
48+
| Field | Type | Required | Default | Description |
49+
|----------------|--------|----------|---------|------------------------------------------------------------------------|
50+
| `types` | object | No | - | Reusable type definitions referenced in parameters |
51+
| `parameters` | object | No | - | Static parameters exposed to developers (same across all envs) |
52+
| `envOverrides` | object | Yes | - | Parameters that can be overridden per environment (Must have defaults) |
5353

5454
#### Parameter Schema Syntax
5555

@@ -65,20 +65,23 @@ Supported types: `string`, `integer`, `boolean`, `array<type>`, custom type refe
6565

6666
```yaml
6767
schema:
68-
types:
69-
Resources:
70-
cpu: "string | default=100m"
71-
memory: "string | default=256Mi"
72-
73-
parameters:
74-
replicas: "integer | default=1"
75-
port: "integer | default=8080"
76-
imagePullPolicy: "string | default=IfNotPresent | enum=Always,IfNotPresent,Never"
77-
78-
envOverrides:
79-
resources:
80-
requests: Resources
81-
limits: Resources
68+
types:
69+
ResourceRequirements:
70+
requests: "ResourceQuantity | default={}"
71+
limits: "ResourceQuantity | default={}"
72+
ResourceQuantity:
73+
cpu: "string | default=100m"
74+
memory: "string | default=256Mi"
75+
76+
parameters:
77+
replicas: "integer | default=1"
78+
imagePullPolicy: "string | default=IfNotPresent"
79+
port: "integer | default=80"
80+
exposed: "boolean | default=false"
81+
containerName: "string | default=main"
82+
83+
envOverrides:
84+
resources: "ResourceRequirements | default={}"
8285
```
8386

8487
### ResourceTemplate
@@ -238,7 +241,7 @@ spec:
238241
resources:
239242
- id: deployment
240243
template:
241-
# ... deployment spec ...
244+
# ... deployment spec ...
242245
243246
- id: file-config
244247
includeWhen: ${has(configurations.configs.files) && configurations.configs.files.size() > 0}

0 commit comments

Comments
 (0)