Skip to content

Commit bec5c54

Browse files
committed
OSDOCS-14472: CPMS custom machine name prefixes
1 parent c01c251 commit bec5c54

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

machine_management/control_plane_machine_management/cpmso-configuration.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ include::modules/cpmso-yaml-sample-cr.adoc[leveloffset=+1]
1717
1818
* xref:../../machine_management/control_plane_machine_management/cpmso-managing-machines.adoc#cpmso-feat-config-update_cpmso-managing-machines[Updating the control plane configuration]
1919
20+
[id="cpmso-config-options_{context}"]
21+
== Control plane machine set configuration options
22+
23+
You can configure your control plane machine set to make customizations that meet your cluster's needs.
24+
25+
//Adding a custom prefix to control plane machine names
26+
include::modules/cpmso-config-options.adoc[leveloffset=+2]
27+
2028
[id="cpmso-sample-yaml-provider-specific_{context}"]
2129
== Provider-specific configuration options
2230

modules/cpmso-config-options.adoc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * machine_management/cpmso-configuration.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="cpmso-config-prefix_{context}"]
7+
= Adding a custom prefix to control plane machine names
8+
9+
You can customize the prefix of machine names created by a control plane machine set.
10+
This can be done by editing a control plane machine set custom resource (CR)
11+
12+
.Procedure
13+
14+
// Saw the step below in another procedure, let me know if it's good to keep it in here.
15+
16+
. Edit your control plane machine set CR by running the following command:
17+
+
18+
[source,terminal]
19+
----
20+
$ oc edit controlplanemachineset.machine.openshift.io cluster \
21+
-n openshift-machine-api
22+
----
23+
24+
. Add the following snippet to the `ControlPlaneMachineSet` CR:
25+
+
26+
[source,yaml]
27+
----
28+
spec:
29+
machineNamePrefix: <machine_prefix>
30+
----
31+
+
32+
where `<machine_prefix>` specifies a prefix name that satisfies the following requirements:
33+
34+
** The name contains no more than 253 characters
35+
** The name contains only lowercase alphanumeric characters, `-`, or `.`
36+
** The name starts and ends with an alphanumeric character
37+
38+
. Save your changes to the `ControlPlaneMachineSet` CR.
39+
40+
. If you are using an `OnDelete` update strategy for your control plane machine set: Manually apply the prefix to the name of any existing machines.

0 commit comments

Comments
 (0)