Skip to content

Conversation

paigecalvert
Copy link
Contributor

@paigecalvert paigecalvert commented Sep 3, 2025

@paigecalvert paigecalvert requested a review from a team as a code owner September 3, 2025 17:12
Copy link

netlify bot commented Sep 3, 2025

Deploy Preview for replicated-docs-upgrade ready!

Name Link
🔨 Latest commit fd5b66b
🔍 Latest deploy log https://app.netlify.com/projects/replicated-docs-upgrade/deploys/68bb1a0f33540500087d5dac
😎 Deploy Preview https://deploy-preview-3510--replicated-docs-upgrade.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Sep 3, 2025

Deploy Preview for replicated-docs ready!

Name Link
🔨 Latest commit fd5b66b
🔍 Latest deploy log https://app.netlify.com/projects/replicated-docs/deploys/68bb1a0fba7a10000831f220
😎 Deploy Preview https://deploy-preview-3510--replicated-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@paigecalvert paigecalvert changed the title 128361 Add ConfigValues reference topic Sep 3, 2025
@replicated-ci replicated-ci added type::docs Improvements or additions to documentation type::feature labels Sep 3, 2025
@@ -0,0 +1,6 @@
The ConfigValues resource must meet the following requirements:
* Must be valid YAML.
* It is not necessary to set a `value` for each configuration item in the ConfigValues, unless the item is [`required`](/reference/custom-resource-config#required) and has no [`default`](/reference/custom-resource-config#default) set in the Config resource.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • It is not necessary to set a value for each configuration item in the ConfigValues, unless the item is required and has no default set in the Config resource.

I'm not super confident about this one. In https://github.com/replicated-collab/pixee-replicated/issues/75#issuecomment-3063546723, Ethan says "all KOTS requires that all values and defaults are set." When I tested an install of slackernews excluding several fields from the ConfigValues, it seems to install fine (as long as those items weren't required).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: seems like there might be fewer requirements. When testing, I could get an install to succeed by passing a ConfigValues with only the required items set

The ConfigValues resource must meet the following requirements:
* Must be valid YAML.
* It is not necessary to set a `value` for each configuration item in the ConfigValues, unless the item is [`required`](/reference/custom-resource-config#required) and has no [`default`](/reference/custom-resource-config#default) set in the Config resource.
* For each configuration item defined in the Config resource that has a [`default`](/reference/custom-resource-config#default) set, the ConfigValues must also list the default in the `default` property. Defaults are not automatically merged from the Config resource during installation.
Copy link
Contributor Author

@paigecalvert paigecalvert Sep 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • For each configuration item defined in the Config resource that has a default set, the ConfigValues must also list the default in the default property. Defaults are not automatically merged from the Config resource during installation.

Similar to above, I got this from https://github.com/replicated-collab/pixee-replicated/issues/75#issuecomment-3063546723. With my slackernews test, I excluded the node_port_port config item from the ConfigValues (which has a default set to 443), and the field as well as the 443 default both appeared in the ConfigValues that was generated for the release.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valuePlainText: exampleplaintextpassword
select_one_config_item_name:
default: default_option_name
value: selected_option_name
Copy link
Contributor Author

@paigecalvert paigecalvert Sep 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made a few edits to the existing examples. adds some new fields and updates the placeholder language/formatting

* A value rendered by a Replicated template function. For example, a [`hidden`](/reference/custom-resource-config#hidden) item defined in the Config resource could use the Replicated [RandomString](/reference/template-functions-static-context#randomstring) template function to set the value with `value: repl{{ RandomString 40}}`. In this case, the value for the item in the ConfigValues would be generated by the template function and not user-supplied. For more information about using Replicated template functions, see [About Template Functions](/reference/template-functions-about).
* An encrypted empty string. For any `password` configuration items without a user-supplied value, the Admin Console sets the value to an empty string. In the ConfigValues generated for the installation, this empty string is automatically encrypted.
* An empty mapping (`{}`). For configuration items without a user-supplied `value` or a `default` set, the value is set to `{}`.
:::
Copy link
Contributor Author

@paigecalvert paigecalvert Sep 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ I added this note to explain how you might see some values that are not "user-supplied" in the value property if you download the ConfigValues from the Admin Console/CLI after install. The encrypted empty string one comes from https://github.com/replicated-collab/pixee-replicated/issues/75#issuecomment-3090171435


<ConfigValuesRequirements/>

For more information, see [ConfigValues](/reference/custom-resource-configvalues).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ Added the new list of requirements as well as a link to the new ConfigValues page to the prereqs in the EC and KOTS automated install topics

import ConfigValuesRequirements from "../partials/configValues/_requirements.mdx"
import GetConfigValues from "../partials/configValues/_config-values-procedure.mdx"

# ConfigValues
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ new reference topic that describes the ConfigValues, including info about the spec, examples, info about downloading the generated ConfigValues, requirements, and limitations


### values.[item_name].valuePlainText {#valueplaintext}

A plain text value. For any configuration items of type [`password`](/reference/custom-resource-config#password), the password must be provided in plain text in a `valuePlainText` property rather than in the `value` property.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ explaining how you have to set passwords with valuePlainText


For each installation, the Admin Console automatically generates a ConfigValues resource and makes it available for download in the Admin Console **View files** tab or with the [`kots get config`](/reference/kots-cli-get-config) command.

<GetConfigValues/>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ this was an existing procedure, but it was only being used in the KOTS existing cluster automated/headless install page. Moving it over here so it can be linked to from a logical location

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

goal was to show mapping between an item in the Config resource and how you can set it in the ConfigValues

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

goal was to show how a password value that's set in plain text in the user-supplied ConfigValues gets rendered in the ConfigValues generated by the Admin Console post install


The following image shows how application configuration items defined a Config resource map to a ConfigValues resource:

![Config fields mapped from Config resource to ConfigValues resource](/images/configvalues-diagram.png)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ added a couple new visuals to help show how the configvalues works

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these were nice


The following image shows how application configuration items defined a Config resource map to a ConfigValues resource:

![Config fields mapped from Config resource to ConfigValues resource](/images/configvalues-diagram.png)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these were nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::docs Improvements or additions to documentation type::feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants