Skip to content

Commit 20e0a9f

Browse files
committed
Add ConfigValues reference topic
1 parent cbd264b commit 20e0a9f

File tree

3 files changed

+62
-9
lines changed

3 files changed

+62
-9
lines changed

docs/reference/custom-resource-configvalues.mdx

Lines changed: 61 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,71 @@
22

33
This topic describes the Replicated KOTS ConfigValues custom resource. ConfigValues is used to provide application-specific configuration values during automated (headless) installations with the CLI.
44

5+
## Overview
6+
7+
The ConfigValues custom resource lists the user-supplied and default values for each item defined in the Replicated KOTS Config custom resource in the given release.
8+
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).
10+
11+
The following image shows an example of how a config field defined in the Config custom resource in a release is represented in a ConfigValues:
12+
13+
![Config fields mapped from Config resource to ConfigValues resource](/images/configvalues-diagram.png)
14+
15+
[View a larger version of this image](/images/configvalues-diagram.png)
16+
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 from the Config resource (if applicable) as well as the user-supplied `value`.
18+
519
## Example
620

21+
The following shows an example of a ConfigValues resource that was generated for an application named SlackerNews:
22+
723
```yaml
824
apiVersion: kots.io/v1beta1
925
kind: ConfigValues
26+
metadata:
27+
creationTimestamp: null
28+
name: slackernews
1029
spec:
1130
values:
12-
text_config_field_name:
13-
default: Example default value
14-
value: Example user-provided value
15-
boolean_config_field_name:
16-
default: "0"
17-
value: "1"
18-
password_config_field_name:
19-
valuePlaintext: examplePassword
20-
```
31+
certificate_source:
32+
default: generate_internal
33+
deploy_postgres:
34+
default: "1"
35+
node_port_port:
36+
default: "443"
37+
postgres_external_uri: {}
38+
postgres_password:
39+
value: 68t0HiPFRtVzR+Qy4LEvIGM7OKk0yaPCdlxVNKNkAq3FYEZHTg0SwsGZNumRXcJhJAl2i5g3jS4=
40+
service_type:
41+
default: node_port
42+
slack_bot_token:
43+
value: v6awag8ovTZIKrvU/Rh4PQ==
44+
slack_clientid: {}
45+
slack_clientsecret:
46+
value: v6awag8ovTZIKrvU/Rh4PQ==
47+
slack_user_token:
48+
value: v6awag8ovTZIKrvU/Rh4PQ==
49+
slackernews_admin_user_emails: {}
50+
slackernews_domain:
51+
value: charming-sanderson.ingress.replicatedcluster.com
52+
tls_ca: {}
53+
tls_cert: {}
54+
tls_key: {}
55+
status: {}
56+
```
57+
58+
## values
59+
60+
### [item_name].default
61+
62+
The `default` value that was set for the item in the Config custom resource in the release.
63+
64+
Changing the `default` in the ConfigValues had no affect on the default value for the item. To change the default for an item, you must edit the item in the Config resource.
65+
66+
When providing a ConfigValues to perform a headless installation from the command line, it is not necessary to list the `default` value for each item.
67+
68+
### [item_name].value
69+
70+
The user-supplied value for the item. This corresponds to the value supplied by the user in the Admin Console config screen.
71+
72+
To perform an automated or headless install from the command line, users must provide a ConfigValues with a `value` for each required config item.

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ const sidebars = {
389389
'reference/custom-resource-about',
390390
'reference/custom-resource-application',
391391
'reference/custom-resource-config',
392+
'reference/custom-resource-configvalues',
392393
'reference/custom-resource-helmchart-v2',
393394
'reference/custom-resource-helmchart',
394395
'reference/custom-resource-lintconfig',
98.4 KB
Loading

0 commit comments

Comments
 (0)