-
Notifications
You must be signed in to change notification settings - Fork 29
Add ConfigValues reference topic #3510
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for replicated-docs-upgrade ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for replicated-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asking eng for clarification: https://replicated.slack.com/archives/C036BTS7JCE/p1757014567063689
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 thedefault
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asking eng for clarification: https://replicated.slack.com/archives/C036BTS7JCE/p1757014567063689
valuePlainText: exampleplaintextpassword | ||
select_one_config_item_name: | ||
default: default_option_name | ||
value: selected_option_name |
There was a problem hiding this comment.
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 `{}`. | ||
::: |
There was a problem hiding this comment.
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). |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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/> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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: | ||
|
||
 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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: | ||
|
||
 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these were nice
Co-authored-by: Alex Parker <[email protected]>
https://deploy-preview-3510--replicated-docs-upgrade.netlify.app/reference/custom-resource-configvalues