Skip to content

Commit 3ecb8f2

Browse files
committed
add requirements for configvalues
1 parent aba140f commit 3ecb8f2

File tree

4 files changed

+25
-11
lines changed

4 files changed

+25
-11
lines changed

docs/partials/configValues/_configValuesExample.mdx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ apiVersion: kots.io/v1beta1
33
kind: ConfigValues
44
spec:
55
values:
6-
text_config_field_name:
7-
default: Example default value
8-
value: Example user-provided value
9-
boolean_config_field_name:
6+
config_item_name:
7+
default: example_default_value
8+
value: example_value
9+
boolean_config_item_name:
1010
value: "1"
11-
password_config_field_name:
12-
valuePlaintext: examplePassword
11+
password_config_item_name:
12+
valuePlaintext: exampleplaintextpassword
13+
select_one_config_item_name:
14+
default: default_option_name
15+
value: selected_option_name
1316
```
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
The ConfigValues resource passed to the install command must meet the following requirements:
2+
* Must be valid YAML
3+
* Must list all configuration items that are defined in the corresponding Config resource in the release
4+
* For each item in the Config resource that has a default, the ConfigValues must also list the item's default. Default values are not automatically merged from the Config resource during installation.
5+
* For any configuration items of type `password`, provide the password in plain text in a `valuePlainText` property rather than in the `value` property. For example, `valuePlainText: somesecretvalue`.

docs/reference/custom-resource-configvalues.mdx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1+
import ConfigValuesExample from "../partials/configValues/_configValuesExample.mdx"
2+
13
# ConfigValues
24

35
This topic describes the Replicated KOTS ConfigValues custom resource. ConfigValues is used to provide application configuration values during automated or headless installations with the CLI.
46

57
## Overview
68

7-
The ConfigValues custom resource lists the user-supplied and default values for each application configuration item defined in the Replicated KOTS Config custom resource in the release. For more information about the Config custom resource, see [Config](custom-resource-config).
9+
The ConfigValues resource lists the values and defaults set for each application configuration item defined in the Replicated KOTS Config custom resource in the release. For more information about the Config custom resource, see [Config](custom-resource-config).
10+
11+
For each installation, the Admin Console automatically generates a ConfigValues resource and makes it available for download in the **View files** tab.
812

9-
For each installation, the Admin Console automatically generates a ConfigValues resource and makes it available for download in the **View files** tab. End users can also manually create a ConfigValues resource. For example, users must pass a ConfigValues resource during automated or headless installs from the command line to provide application configuration values to the Admin Console. For more information about performing headless installations, see [Automate Embedded Cluster Installations](/enterprise/installing-embedded-automation) and [Automate Existing Cluster Installations with the KOTS CLI](/enterprise/installing-existing-cluster-automation).
13+
In automated or headless installs from the command line, end users must pass a ConfigValues resource to the install command to provide application configuration values to the Admin Console. For more information about performing headless installations, see [Automate Embedded Cluster Installations](/enterprise/installing-embedded-automation) and [Automate Existing Cluster Installations with the KOTS CLI](/enterprise/installing-existing-cluster-automation).
1014

11-
The following image shows how a ConfigValues resource is generated based on the items defined in a Config resource:
15+
The following image shows how application configuration items defined a Config resource are represented in a ConfigValues resource:
1216

1317
![Config fields mapped from Config resource to ConfigValues resource](/images/configvalues-diagram.png)
1418

1519
[View a larger version of this image](/images/configvalues-diagram.png)
1620

17-
As shown in the image above, the ConfigValues resource `values` key lists each item from the Config resource by its `name`. For each item, the ConfigValues lists the `default` value defined in the Config resource (if applicable) as well as the user-supplied `value`.
21+
As shown in the image above, the ConfigValues resource `values` key lists each item from the Config resource by its `name`. For each item, the ConfigValues resource lists the user-supplied value as well as the default that was defined in the Config resource (if applicable).
1822

19-
## Examples
23+
## Example
2024

25+
The following shows an example of a ConfigValues resource that can be provided during automated or headless installation from the command line:
2126

27+
<ConfigValuesExample/>
2228

2329
## Spec
2430

797 Bytes
Loading

0 commit comments

Comments
 (0)