|
2 | 2 |
|
3 | 3 | 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. |
4 | 4 |
|
| 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 | + |
| 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 | + |
5 | 19 | ## Example |
6 | 20 |
|
| 21 | +The following shows an example of a ConfigValues resource that was generated for an application named SlackerNews: |
| 22 | + |
7 | 23 | ```yaml |
8 | 24 | apiVersion: kots.io/v1beta1 |
9 | 25 | kind: ConfigValues |
| 26 | +metadata: |
| 27 | + creationTimestamp: null |
| 28 | + name: slackernews |
10 | 29 | spec: |
11 | 30 | 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. |
0 commit comments