Skip to content

Commit 4977e4d

Browse files
addetzgithub-actions[bot]achuribooks
authored
docs: add cluster profile variables PEM-8647 (#8332)
* docs: add cluster profile variables PEM-8647 * Optimised images with calibre/image-actions * Apply suggestion from @achuribooks Co-authored-by: Amanda Churi Filanowski <[email protected]> * Apply suggestion from @achuribooks Co-authored-by: Amanda Churi Filanowski <[email protected]> * Apply suggestion from @achuribooks Co-authored-by: Amanda Churi Filanowski <[email protected]> * Apply suggestion from @achuribooks Co-authored-by: Amanda Churi Filanowski <[email protected]> * Apply suggestion from @achuribooks Co-authored-by: Amanda Churi Filanowski <[email protected]> * Apply suggestion from @achuribooks Co-authored-by: Amanda Churi Filanowski <[email protected]> * ci: auto-formatting prettier issues * docs: update images * Optimised images with calibre/image-actions --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Amanda Churi Filanowski <[email protected]>
1 parent 2e9bc49 commit 4977e4d

10 files changed

+47
-20
lines changed

docs/docs-content/profiles/cluster-profiles/create-cluster-profiles/define-profile-variables/create-cluster-profile-variables.md

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,16 @@ guide to learn how to create a cluster profile.
5252

5353
6. Optionally, enter a variable **Description**.
5454

55-
7. Select the data format for the variable. The following table describes available data formats.
55+
7. Select the **Input type** of the variable. You can choose between **Text** and **Dropdown**. The default input type
56+
is **Text**.
57+
58+
:::info
59+
60+
The dropdown input type is currently not supported in [Local UI](../../../../clusters/edge/local-ui/local-ui.md).
61+
62+
:::
63+
64+
8. Select the data format for the variable. The following table describes available data formats.
5665

5766
| **Format** | **Description** |
5867
| ---------- | ------------------------------------------------------------------------------------------------------ |
@@ -64,28 +73,39 @@ guide to learn how to create a cluster profile.
6473
| IPv4 CIDR | A CIDR block of IP addresses that follow the IPv4 standard. |
6574
| IPv6 | Valid representation of an IPv6 address. |
6675

67-
8. Optionally, configure additional data validation. The following table describes the available parameters.
76+
9. If you selected **Dropdown** for the **Input type** in step 7, select **Add dropdown option**. The following table
77+
describes the available configuration fields. You must provide at least one dropdown option.
78+
79+
| **Field** | **Description** |
80+
| --------------- | --------------------------------------------------------------------------------------------------------- |
81+
| **Value** | Value of the dropdown option. This field is required. |
82+
| **Label** | Display name for the dropdown option. If no label is provided, the **Value** is used as the display name. |
83+
| **Description** | Long form description of the dropdown option. |
84+
85+
Repeat this step for every dropdown option you want to add.
86+
87+
10. Optionally, configure additional data validation. The following table describes the available parameters.
6888

69-
| **Parameter** | **Description** |
70-
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
71-
| Custom input validation | Validate the cluster profile variable definition against a regular expression based on the [regexp](https://pkg.go.dev/regexp) engine. |
72-
| Required | Require a value for the cluster profile variable. |
73-
| Default value | Set a default value for the cluster profile variable. |
74-
| Mask value | Mask the cluster profile variable with asterisks in the layer YAML configuration. When you export a profile with masked variables, they will be masked in the exported profile. Upon import, you will be required to provide the masked values. |
75-
| Hidden | Hide the cluster profile variable during cluster deployment. If the variable is both hidden and required, it must have a default value set. |
76-
| Read-only | Prevent the cluster profile variable from being edited during cluster deployment. Read-only variables must have a default value set. |
89+
| **Parameter** | **Description** |
90+
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
91+
| **Custom input validation** | Validate the cluster profile variable definition against a regular expression based on the [regexp](https://pkg.go.dev/regexp) engine. |
92+
| **Required** | Require a value for the cluster profile variable. |
93+
| **Default value** | Set a default value for the cluster profile variable. If the **Input type** is **Dropdown**, a default value must be specified using one of the configured dropdown options. |
94+
| **Mask value** | Mask the cluster profile variable with asterisks in the layer YAML configuration. When you export a profile with masked variables, they will be masked in the exported profile. Upon import, you will be required to provide the masked values. |
95+
| **Hidden** | Hide the cluster profile variable during cluster deployment. If the variable is both hidden and required, it must have a default value set. |
96+
| **Read-only** | Prevent the cluster profile variable from being edited during cluster deployment. Read-only variables must have a default value set. |
7797

78-
9. As you make changes in the **Create variable** pane, the **Preview** field is updated, mirroring how the field will
98+
11. As you make changes in the **Create variable** pane, the **Preview** field is updated, mirroring how the field will
7999
look and behave when deploying and updating clusters. When you are satisfied, **Create** the variable.
80100

81101
![Palette YAML editor with the added profile variables.](/profiles_create-cluster-profiles_define-profile-variables_variable-preview.webp)
82102

83-
10. Navigate to the YAML configuration of the profile layer to which you want to add the variable. In the upper-right
103+
12. Navigate to the YAML configuration of the profile layer to which you want to add the variable. In the upper-right
84104
corner of its YAML configuration editor, select **Variables**.
85105

86-
11. Next to the variable you want to add, select the **Copy to clipboard** icon to copy its name.
106+
13. Next to the variable you want to add, select the **Copy to clipboard** icon to copy its name.
87107

88-
12. Paste the variable in the `parameter: '{{.spectro.var.variable_name}}'` format. You _must_ wrap each profile
108+
14. Paste the variable in the `parameter: '{{.spectro.var.variable_name}}'` format. You _must_ wrap each profile
89109
variable in single quotes (`'`) to properly validate the schema. Select **Confirm Updates** when finished.
90110

91111
Alternatively, you can start typing `{{.spectro.var.}}` in the YAML configuration editor, and Palette will list the
@@ -111,7 +131,7 @@ guide to learn how to create a cluster profile.
111131

112132
:::
113133

114-
13. Repeat the steps described in this guide to define more variables and add them to the necessary cluster profile
134+
15. Repeat the steps described in this guide to define more variables and add them to the necessary cluster profile
115135
layers. Remember to choose **Confirm Updates** when you are finished with each layer, and select **Save Changes**
116136
when you are finished modifying your profile.
117137

@@ -145,8 +165,9 @@ the infrastructure provider; however, when cluster profile variables are configu
145165
always be an additional **Profile Config** window displayed prior to deploying the cluster. To learn more about
146166
deploying clusters, visit our [Getting Started](../../../../getting-started/getting-started.md) series.
147167

148-
Note that in the below example, we entered `amazing-hello-universe-namespace` for the namespace of the Hello Universe
149-
application.
168+
Note that in the below example, `amazing-hello-universe-namespace` is the namespace of the Hello Universe application.
169+
The `Calico: Network CIDR` and `Kubecost: Frontend ImagePullPolicy` variables have the dropdown input type. You can
170+
select any configured dropdown option for the cluster.
150171

151172
![Deploying a cluster and configuring cluster profile variables on the Profile Config window.](/profiles_cluster-profiles_create-cluster-profiles_define-profile-variables_create-cluster-profile-variable-profile-config.webp)
152173

docs/docs-content/profiles/cluster-profiles/create-cluster-profiles/define-profile-variables/define-profile-variables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ The following table describes the differences between profile variables and macr
4747
Palette SaaS, but their values can be edited in [Local UI](../../../../clusters/edge/local-ui/local-ui.md) prior to
4848
deploying a cluster.
4949

50+
- The dropdown input type is not supported in Local UI.
51+
5052
## Next Steps
5153

5254
Refer to the [Create Cluster Profile Variables](./create-cluster-profile-variables.md) guide to learn how to begin using

docs/docs-content/profiles/cluster-profiles/create-cluster-profiles/define-profile-variables/modify-cluster-profile-variables.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,20 @@ the appropriate workflow based on the changes you make to your cluster.
141141
action.
142142

143143
7. **Review & Save** your changes. The **Changes Summary** dialog appears. Select **Review changes in Editor**.
144+
144145
8. Use the **Profile variable changes** tab to view the profiles that were changed. Expand each profile to compare the
145146
**Running configuration** and **New configuration**, making any necessary changes to your cluster profile variables.
146147
If you are overwriting the default value, you can revert to the original value by selecting **Use Default**. Updated
147148
profile variable values must match the schema defined in the cluster profile variable.
148149

149150
Each profile must have a **Reviewed** status, indicated by a green check mark, before you can apply your changes.
150151
Hovering over each icon between **Running configuration** and **New configuration** explains what is being done for
151-
each variable. In the below example, we made the following changes:
152+
each variable. The below example includes the following changes:
152153

153154
- Changed the Kubecost frontend `imagePullPolicy` from `Always` to `IfNotPresent`.
154155

155156
- Changed the default value of the Hello Universe `namespace` variable. The value assigned for profile version 1.1.0
156-
is the same as the value for version 1.0.0 and is not overwritten unless we select **Use new default**.
157+
is the same as the value for version 1.0.0 and is not overwritten unless you select **Use new default**.
157158

158159
- Added a new profile variable for Grafana.
159160

@@ -198,7 +199,7 @@ the appropriate workflow based on the changes you make to your cluster.
198199

199200
6. Modify the values of your profile variables. The updated value must match the schema defined in the cluster profile
200201
variable. If you are overwriting the default value, you can revert to the original value by selecting **Use
201-
Default**. In the example below, we changed the Kubecost frontend `imagePullPolicy` from `Always` to `IfNotPresent`.
202+
Default**. In the example below, the Kubecost frontend `imagePullPolicy` changed from `Always` to `IfNotPresent`.
202203

203204
![Overwriting existing cluster profile variables without modifying cluster profile](/profiles_cluster-profiles_create-cluster-profiles_define-profile-variables_modify-cluster-profile-variable-override-updated.webp)
204205

docs/docs-content/release-notes/release-notes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ tags: ["release-notes"]
3131
- When viewing project platform settings in Palette, the
3232
[Cluster Auto Remediation](../clusters/cluster-management/platform-settings/cluster-auto-remediation.md) settings are
3333
now correctly labeled as an override to the tenant-level settings.
34+
- [Cluster profile variables](../profiles/cluster-profiles/create-cluster-profiles/define-profile-variables/create-cluster-profile-variables.md)
35+
now support the dropdown input type. This improvement allows users to enforce the configuration of cluster profile
36+
variables using predefined values only, reducing input errors and enhancing cluster profile validation.
3437

3538
#### Deprecations and Removals
3639

Loading
Loading
Loading
105 KB
Loading
104 KB
Loading
54.6 KB
Loading

0 commit comments

Comments
 (0)