remove kots-specific temp func examples#4067
Conversation
✅ Deploy Preview for replicated-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for replicated-docs-upgrade ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| ### Boolean comparison | ||
|
|
||
| Boolean values can be used in comparisons to evaluate if a given statement is true or false. Because many Replicated template functions return string values, comparing boolean values often requires using the KOTS [ParseBool](/reference/template-functions-static-context#parsebool) template function to return the boolean represented by the string. | ||
| Boolean values can be used in comparisons to evaluate if a given statement is true or false. Because many Replicated template functions return string values, comparing boolean values often requires using the Replicated [ParseBool](/reference/template-functions-static-context#parsebool) template function to return the boolean represented by the string. |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.Passive] In general, use active voice instead of passive voice ('be used').
| Boolean values can be used in comparisons to evaluate if a given statement is true or false. Because many Replicated template functions return string values, comparing boolean values often requires using the Replicated [ParseBool](/reference/template-functions-static-context#parsebool) template function to return the boolean represented by the string. | ||
|
|
||
| One common use case for working with boolean values is to check that a given field is present in the customer's license. For example, you might need to show a configuration option on the KOTS Admin Console **Config** page only when the customer's license has a certain entitlement. | ||
| One common use case for working with boolean values is to check that a given field is present in the customer's license. For example, you might need to show a configuration option on the Replicated Admin Console **Config** page only when the customer's license has a certain entitlement. |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.SentenceLength] Try to keep your sentence length to 26 words or fewer.
| One common use case for working with boolean values is to check that a given field is present in the customer's license. For example, you might need to show a configuration option on the Replicated Admin Console **Config** page only when the customer's license has a certain entitlement. | ||
|
|
||
| The following example creates a conditional statement in the Replicated Config custom resource that evaluates to true when a specified license field is present in the customer's license _and_ the customer enables a specified configuration option on the Admin Console **Config** page. | ||
| The following example creates a conditional statement in the Replicated Config custom resource that evaluates to true when a specified license field is present in the customer's license _and_ the customer enables a specified configuration option. |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.SentenceLength] Try to keep your sentence length to 26 words or fewer.
| * Sprig [atoi](https://masterminds.github.io/sprig/conversion.html), which is equivalent to ParseInt(s, 10, 0), converted to type integer | ||
|
|
||
| A common use case for comparing integer values with Replicated template functions is to display different configuration options on the KOTS Admin Console **Config** page depending on integer values from the customer's license. For example, licenses might include an entitlement that defines the number of seats the customer is entitled to. In this case, it can be useful to conditionally display or hide certain fields on the **Config** page depending on the customer's team size. | ||
| A common use case for comparing integer values with Replicated template functions is to display different configuration options on the configuration screen in the Replicated installer UI depending on integer values from the customer's license. For example, licenses might include an entitlement that defines the number of seats the customer is entitled to. In this case, it can be useful to conditionally display or hide certain fields on the configuation screen depending on the customer's team size. |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.SentenceLength] Try to keep your sentence length to 26 words or fewer.
| * Sprig [atoi](https://masterminds.github.io/sprig/conversion.html), which is equivalent to ParseInt(s, 10, 0), converted to type integer | ||
|
|
||
| A common use case for comparing integer values with Replicated template functions is to display different configuration options on the KOTS Admin Console **Config** page depending on integer values from the customer's license. For example, licenses might include an entitlement that defines the number of seats the customer is entitled to. In this case, it can be useful to conditionally display or hide certain fields on the **Config** page depending on the customer's team size. | ||
| A common use case for comparing integer values with Replicated template functions is to display different configuration options on the configuration screen in the Replicated installer UI depending on integer values from the customer's license. For example, licenses might include an entitlement that defines the number of seats the customer is entitled to. In this case, it can be useful to conditionally display or hide certain fields on the configuation screen depending on the customer's team size. |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.Passive] In general, use active voice instead of passive voice ('is entitled').
| The Sprig [genCA](https://masterminds.github.io/sprig/crypto.html) and [genSignedCert](https://masterminds.github.io/sprig/crypto.html) functions require the subject's common name and the certificate's validity duration in days. The `genSignedCert` function also requires the CA that will sign the certificate. You can use variables and Replicated template functions to provide the necessary parameters when calling these functions. | ||
|
|
||
| The following example shows how to use variables and Replicated template functions in the `default` property of a [`hidden`](/reference/custom-resource-config#hidden) item to pass parameters to the `genCA` and `genSignedCert` functions and generate a CA, certificate, and key. This example uses a `hidden` item (which is an item that is not displayed on the **Config** page) to generate the certificate chain because variables used in the Replicated Config custom resource can only be accessed from the same item where they were declared. For this reason, `hidden` items can be useful for evaluating complex templates. | ||
| The following example shows how to use variables and Replicated template functions in the `default` property of a [`hidden`](/reference/custom-resource-config#hidden) item to pass parameters to the `genCA` and `genSignedCert` functions and generate a CA, certificate, and key. This example uses a `hidden` item (which is an item that is not displayed on the configuration screen) to generate the certificate chain because variables used in the Replicated Config custom resource can only be accessed from the same item where they were declared. For this reason, `hidden` items can be useful for evaluating complex templates. |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.SentenceLength] Try to keep your sentence length to 26 words or fewer.
| The Sprig [genCA](https://masterminds.github.io/sprig/crypto.html) and [genSignedCert](https://masterminds.github.io/sprig/crypto.html) functions require the subject's common name and the certificate's validity duration in days. The `genSignedCert` function also requires the CA that will sign the certificate. You can use variables and Replicated template functions to provide the necessary parameters when calling these functions. | ||
|
|
||
| The following example shows how to use variables and Replicated template functions in the `default` property of a [`hidden`](/reference/custom-resource-config#hidden) item to pass parameters to the `genCA` and `genSignedCert` functions and generate a CA, certificate, and key. This example uses a `hidden` item (which is an item that is not displayed on the **Config** page) to generate the certificate chain because variables used in the Replicated Config custom resource can only be accessed from the same item where they were declared. For this reason, `hidden` items can be useful for evaluating complex templates. | ||
| The following example shows how to use variables and Replicated template functions in the `default` property of a [`hidden`](/reference/custom-resource-config#hidden) item to pass parameters to the `genCA` and `genSignedCert` functions and generate a CA, certificate, and key. This example uses a `hidden` item (which is an item that is not displayed on the configuration screen) to generate the certificate chain because variables used in the Replicated Config custom resource can only be accessed from the same item where they were declared. For this reason, `hidden` items can be useful for evaluating complex templates. |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.Passive] In general, use active voice instead of passive voice ('be accessed').
| The Sprig [genCA](https://masterminds.github.io/sprig/crypto.html) and [genSignedCert](https://masterminds.github.io/sprig/crypto.html) functions require the subject's common name and the certificate's validity duration in days. The `genSignedCert` function also requires the CA that will sign the certificate. You can use variables and Replicated template functions to provide the necessary parameters when calling these functions. | ||
|
|
||
| The following example shows how to use variables and Replicated template functions in the `default` property of a [`hidden`](/reference/custom-resource-config#hidden) item to pass parameters to the `genCA` and `genSignedCert` functions and generate a CA, certificate, and key. This example uses a `hidden` item (which is an item that is not displayed on the **Config** page) to generate the certificate chain because variables used in the Replicated Config custom resource can only be accessed from the same item where they were declared. For this reason, `hidden` items can be useful for evaluating complex templates. | ||
| The following example shows how to use variables and Replicated template functions in the `default` property of a [`hidden`](/reference/custom-resource-config#hidden) item to pass parameters to the `genCA` and `genSignedCert` functions and generate a CA, certificate, and key. This example uses a `hidden` item (which is an item that is not displayed on the configuration screen) to generate the certificate chain because variables used in the Replicated Config custom resource can only be accessed from the same item where they were declared. For this reason, `hidden` items can be useful for evaluating complex templates. |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.Passive] In general, use active voice instead of passive voice ('were declared').
|
|
||
| This example uses the following: | ||
| * KOTS [ConfigOption](/reference/template-functions-config-context#configoption) template function to render the user-supplied value for the ingress hostname. This is passed as a parameter to the [genCA](https://masterminds.github.io/sprig/crypto.html) and [genSignedCert](https://masterminds.github.io/sprig/crypto.html) functions | ||
| * Replicated [ConfigOption](/reference/template-functions-config-context#configoption) template function to render the user-supplied value for the ingress hostname. This is passed as a parameter to the [genCA](https://masterminds.github.io/sprig/crypto.html) and [genSignedCert](https://masterminds.github.io/sprig/crypto.html) functions |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.Passive] In general, use active voice instead of passive voice ('is passed').
| ``` | ||
|
|
||
| The following image shows how the default values for the CA, certificate, and key are displayed on the **Config** page: | ||
| The following image shows how the default values for the CA, certificate, and key are displayed on the configuration screen: |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.Passive] In general, use active voice instead of passive voice ('are displayed').
| @@ -1 +1 @@ | |||
| Template functions in the config context are available when rendering an application that includes the KOTS [Config](/reference/custom-resource-config) custom resource, which defines the KOTS Admin Console config screen. At execution time, template functions in the config context also can use the static context functions. For more information about configuring the Admin Console config screen, see [About the Configuration Screen](/vendor/config-screen-about). No newline at end of file | |||
| Template functions in the config context are available when rendering an application that includes the Replicated [Config](/reference/custom-resource-config) custom resource, which defines the app configuration screen in the Replicated installer UI. At execution time, template functions in the config context also can use the static context functions. For more information about configuring the config screen, see [About the Configuration Screen](/vendor/config-screen-about). No newline at end of file | |||
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.SentenceLength] Try to keep your sentence length to 26 words or fewer.
| @@ -1,7 +1,7 @@ | |||
| In the example below, the `ingress_type` field is displayed on the **Config** page only when the distribution of the cluster is _not_ [Replicated Embedded Cluster](/embedded-cluster/v3/embedded-overview). This ensures that only users deploying to their own existing cluster are able to select the method for ingress. | |||
| In the example below, the `ingress_type` field is displayed on the configuration page only when the distribution of the cluster is _not_ [Replicated Embedded Cluster](/embedded-cluster/v3/embedded-overview). This ensures that only users deploying to their own existing cluster are able to select the method for ingress. | |||
There was a problem hiding this comment.
[Replicated.PositionalLanguage] Avoid spacial and directional language like 'below'. Instead, use 'on this page', 'the following', or link to the section.
| @@ -1,7 +1,7 @@ | |||
| In the example below, the `ingress_type` field is displayed on the **Config** page only when the distribution of the cluster is _not_ [Replicated Embedded Cluster](/embedded-cluster/v3/embedded-overview). This ensures that only users deploying to their own existing cluster are able to select the method for ingress. | |||
| In the example below, the `ingress_type` field is displayed on the configuration page only when the distribution of the cluster is _not_ [Replicated Embedded Cluster](/embedded-cluster/v3/embedded-overview). This ensures that only users deploying to their own existing cluster are able to select the method for ingress. | |||
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.Passive] In general, use active voice instead of passive voice ('is displayed').
| ### Logical AND comparison | ||
|
|
||
| Logical comparisons such as AND, OR, and NOT can be used with Replicated template functions. A common use case for logical AND comparisons is to construct more complex conditional statements where it is necessary that two different conditions are both true. | ||
| Logical comparisons such as AND, OR, and NOT work with Replicated template functions. |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.Acronyms] Spell out 'AND' on first use, if it's unfamiliar to the audience.
| ### Logical AND comparison | ||
|
|
||
| Logical comparisons such as AND, OR, and NOT can be used with Replicated template functions. A common use case for logical AND comparisons is to construct more complex conditional statements where it is necessary that two different conditions are both true. | ||
| Logical comparisons such as AND, OR, and NOT work with Replicated template functions. |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.Acronyms] Spell out 'NOT' on first use, if it's unfamiliar to the audience.
|
|
||
| Logical comparisons such as AND, OR, and NOT can be used with Replicated template functions. A common use case for logical AND comparisons is to construct more complex conditional statements where it is necessary that two different conditions are both true. | ||
| Logical comparisons such as AND, OR, and NOT work with Replicated template functions. | ||
| A common use case for logical AND comparisons is to construct more complex conditional statements |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.Acronyms] Spell out 'AND' on first use, if it's unfamiliar to the audience.
| ``` | ||
|
|
||
| The following image shows how only the `gke_distribution` item is displayed on the **Config** page when KOTS is running in a GKE cluster: | ||
| The following image shows how only the `gke_distribution` item is displayed on the app configurtion screen: |
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[Replicated.Passive] In general, use active voice instead of passive voice ('is displayed').
| ``` | ||
|
|
||
| The following image shows how only the `gke_distribution` item is displayed on the **Config** page when KOTS is running in a GKE cluster: | ||
| The following image shows how only the `gke_distribution` item is displayed on the app configurtion screen: |
There was a problem hiding this comment.
🚫 [vale] reported by reviewdog 🐶
[Vale.Spelling] Did you really mean 'configurtion'?
No description provided.