-
Notifications
You must be signed in to change notification settings - Fork 31
Add EC --config-values flag and update automated install docs #2830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
7be3ac4
7437988
1423036
40e2e49
68f51ef
33b11ac
87c60bb
2a99082
5dd7638
c5cc427
faca29f
69e08f0
4ca54a3
1a14a45
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,41 +8,66 @@ import TextAreaExample from "../partials/configValues/_textareaExample.mdx" | |
|
|
||
| # Generating a ConfigValues File | ||
|
|
||
| This topic describes how to view the ConfigValues file for an application installed with Replicated KOTS and prepare the ConfigValues file to be shared with your users. | ||
| This topic describes how to generate the Replicated KOTS ConfigValues file for an application release. It also includes recommendations for how to prepare a sample ConfigValues file to be shared with your users. | ||
paigecalvert marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## About ConfigValues Files | ||
| ## Overview | ||
|
|
||
| A ConfigValues file defines the user-supplied configuration values for an application installed with KOTS. Enterprise users can provide a ConfigValues file to configure an application during automated installations with the KOTS CLI. During installation, KOTS reads the values in the ConfigValues file to configure the application. For more information about automated installations with the KOTS CLI, see [Installing with the CLI](/enterprise/installing-existing-cluster-automation). | ||
|
|
||
| ConfigValues files include the configuration fields defined in the Config custom resource for the release, along with the user-supplied and default values for each field. The following is an example of a ConfigValues file: | ||
| The KOTS ConfigValues file includes the fields that are defined in the KOTS Config custom resource for an application release, along with the user-supplied and default values for each field. The following is an example of a ConfigValues file: | ||
|
|
||
| <ConfigValuesExample/> | ||
|
|
||
| The ConfigValues file allows you to pass the configuration values for an application from the command line with the install command, rather than through the Admin Console UI. This supports automated or _headless_ installations, such as when installing an application as part of CI/CD pipelines. | ||
|
|
||
| For more information about installing from the command line, see [Installing with the CLI](/enterprise/installing-existing-cluster-automation). | ||
|
|
||
| ## Get the ConfigValues File | ||
|
|
||
| When installing an application, KOTS automatically generates a ConfigValues file and saves the file in a directory called `upstream`. After installation, you can view the generated ConfigValues file. | ||
| During installation, KOTS automatically generates a ConfigValues file and saves the file in a directory called `upstream`. After installation, you can view the generated ConfigValues file in the Admin Console **View files** tab or from the command line by running the `kubectl kots get config` command. | ||
|
|
||
| To get the ConfigValues file for an application: | ||
| To get the ConfigValues file for a release: | ||
paigecalvert marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 1. Install the target release for the application in a development environment. For more information, see [About Installing an Application](/enterprise/installing-overview). | ||
| 1. Install the target release in a development environment. You can either install the release with Replicated Embedded Cluster or install in an existing cluster with KOTS. For more information, see [Online Installation with Embedded Cluster](/enterprise/installing-embedded) or [Online Installation in Existing Clusters](/enterprise/installing-existing-cluster). | ||
|
|
||
| 1. View the generated ConfigValues file for the installed instance: | ||
| 1. Depending on the installer that you used, do one of the following to get the ConfigValues for the installed instance: | ||
paigecalvert marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ``` | ||
| kubectl kots get config --namespace APP_NAMESPACE --decrypt | ||
| ``` | ||
| Where `APP_NAMESPACE` is the cluster namespace where the application is installed. | ||
|
|
||
| :::note | ||
| The `--decrypt` flag decrypts all configuration fields with `type: password`. In the downloaded ConfigValues file, the decrypted value is stored in a `valuePlaintext` field. | ||
| ::: | ||
| * **For Embedded Cluster installations**: In the Admin Console, go to the **View files** tab. In the filetree, go to **upstream > userdata** and open **config.yaml**, as shown in the image below: | ||
|
|
||
|  | ||
|
|
||
| [View a larger version of this image](/images/admin-console-view-files-configvalues.png) | ||
|
|
||
| The output of the `kots get config` command is the contents of the ConfigValues file. For more information about the `kots get config` command, including additional flags, see [kots get config](/reference/kots-cli-get-config). | ||
| * **For KOTS installations in an existing cluster**: Run the `kubectl kots get config` command to view the generated ConfigValues file: | ||
|
|
||
| ``` | ||
| kubectl kots get config --namespace APP_NAMESPACE --decrypt | ||
| ``` | ||
| Where: | ||
| * `APP_NAMESPACE` is the cluster namespace where KOTS is running. | ||
| * The `--decrypt` flag decrypts all configuration fields with `type: password`. In the downloaded ConfigValues file, the decrypted value is stored in a `valuePlaintext` field. | ||
|
|
||
| The output of the `kots get config` command shows the contents of the ConfigValues file. For more information about the `kots get config` command, including additional flags, see [kots get config](/reference/kots-cli-get-config). | ||
|
|
||
| **Example**: | ||
|
|
||
| ```bash | ||
| kubectl kots get config --namespace namespace --decrypt | ||
| ``` | ||
| ```bash | ||
| apiVersion: kots.io/v1beta1 | ||
| kind: ConfigValues | ||
| metadata: | ||
| creationTimestamp: null | ||
| spec: | ||
| values: | ||
| example_item: | ||
| value: hello world | ||
| ``` | ||
|
|
||
| ## Share a Sample ConfigValues File | ||
|
|
||
| Replicated recommends that you share an example of an accurate ConfigValues file with your users that they can edit for use in automated installations with the KOTS CLI. | ||
| If your users will perform automated or headless installations from the command line, you can share an example of an accurate ConfigValues file that they can edit. | ||
|
|
||
| After you get the ConfigValues file for your application using the `kots get config` command, Replicated recommends that you do the following to edit the contents of the ConfigValues file before sharing it with users: | ||
| Before sharing a sample ConfigValues with users, Replicated recommends that you edit the sample file in the following ways: | ||
|
|
||
| * Remove any configuration fields that have `readonly` set to `true`. Users cannot edit read only fields. For more information, see [readonly](/reference/custom-resource-config#readonly) in _Config_. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I hate this readonly and hidden stuff—it confuses me so much. But looking at the table for randomstring, it seems like
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This content is old enough that I'll make a separate docs story to investigate/confirm... I'm not even sure if the reason that this bullet point appears here actually has to do with ephemeral/persistent values or if it's more like "don't imply to your users that they can set a value for read-only fields"
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
|
|
@@ -65,4 +90,4 @@ After you get the ConfigValues file for your application using the `kots get con | |
| <tr><td><code>textarea</code></td><td><p>Plain text in the <code>value</code> field.</p><TextAreaExample/></td></tr> | ||
| </table> | ||
|
|
||
| For more information about each configuration field type in the Config custom resource, see [Config](/reference/custom-resource-config). | ||
| For more information about each configuration field type in the Config custom resource, see [Config](/reference/custom-resource-config). | ||
Uh oh!
There was an error while loading. Please reload this page.