|
| 1 | +// Module included in the following assemblies: |
| 2 | +// * installing/installing_gcp/installing-gcp-customizations.adoc |
| 3 | + |
| 4 | +:_content-type: PROCEDURE |
| 5 | +[id="installing-gcp-cluster-creation_{context}"] |
| 6 | += Configuring user-defined labels and tags for GCP |
| 7 | + |
| 8 | +.Prerequisites |
| 9 | + |
| 10 | +* The installation program requires that a service account includes a `TagUser` role, so that the program can create the {product-title} cluster with defined tags at both organization and project levels. |
| 11 | +
|
| 12 | +.Procedure |
| 13 | + |
| 14 | +* Update the `install-config.yaml` file to define the list of desired labels and tags. |
| 15 | ++ |
| 16 | +[NOTE] |
| 17 | +==== |
| 18 | +Labels and tags are defined during the `install-config.yaml` creation phase, and cannot be modified or updated with new labels and tags after cluster creation. |
| 19 | +==== |
| 20 | ++ |
| 21 | +.Sample `install-config.yaml` file |
| 22 | ++ |
| 23 | +[source,yaml] |
| 24 | +---- |
| 25 | +apiVersion: v1 |
| 26 | +featureSet: TechPreviewNoUpgrade |
| 27 | +platform: |
| 28 | + gcp: |
| 29 | + userLabels: <1> |
| 30 | + - key: <label_key><2> |
| 31 | + value: <label_value><3> |
| 32 | + userTags: <4> |
| 33 | + - parentID: <OrganizationID/ProjectID><5> |
| 34 | + key: <tag_key_short_name> |
| 35 | + value: <tag_value_short_name> |
| 36 | +---- |
| 37 | +<1> Adds keys and values as labels to the resources created on GCP. |
| 38 | +<2> Defines the label name. |
| 39 | +<3> Defines the label content. |
| 40 | +<4> Adds keys and values as tags to the resources created on GCP. |
| 41 | +<5> The ID of the hierarchical resource where the tags are defined, at the organization or the project level. |
| 42 | +
|
| 43 | +The following are the requirements for user-defined labels: |
| 44 | + |
| 45 | +* A label key and value must have a minimum of 1 character and can have a maximum of 63 characters. |
| 46 | +* A label key and value must contain only lowercase letters, numeric characters, underscore (`_`), and dash (`-`). |
| 47 | +* A label key must start with a lowercase letter. |
| 48 | +* You can configure a maximum of 32 labels per resource. Each resource can have a maximum of 64 labels, and 32 labels are reserved for internal use by {product-title}. |
| 49 | +
|
| 50 | +The following are the requirements for user-defined tags: |
| 51 | + |
| 52 | +* Tag key and tag value must already exist. {product-title} does not create the key and the value. |
| 53 | +* A tag `parentID` can be either `OrganizationID` or `ProjectID`: |
| 54 | +** `OrganizationID` must consist of decimal numbers without leading zeros. |
| 55 | +** `ProjectID` must be 6 to 30 characters in length, that includes only lowercase letters, numbers, and hyphens. |
| 56 | +** `ProjectID` must start with a letter, and cannot end with a hyphen. |
| 57 | +* A tag key must contain only uppercase and lowercase alphanumeric characters, hyphen (`-`), underscore (`_`), and period (`.`). |
| 58 | +* A tag value must contain only uppercase and lowercase alphanumeric characters, hyphen (`-`), underscore (`_`), period (`.`), at sign (`@`), percent sign (`%`), equals sign (`=`), plus (`+`), colon (`:`), comma (`,`), asterisk (`*`), pound sign (`$`), ampersand (`&`), parentheses (`()`), square braces (`[]`), curly braces (`{}`), and space. |
| 59 | +* A tag key and value must begin and end with an alphanumeric character. |
| 60 | +* Tag value must be one of the pre-defined values for the key. |
| 61 | +* You can configure a maximum of 50 tags. |
| 62 | +* There should be no tag key defined with the same value as any of the existing tag keys that will be inherited from the parent resource. |
0 commit comments