Skip to content

Commit 37132b2

Browse files
authored
Merge pull request #75584 from laubai/osdocs-10439-hcp-pid-limit
OSDOCS-10439 PID limit config support for ROSA with HCP
2 parents 25a77b4 + 9bf5728 commit 37132b2

11 files changed

+326
-30
lines changed

_topic_maps/_topic_map_rosa.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ Topics:
588588
File: nodes-cluster-resource-configure
589589
- Name: Configuring PID limits
590590
File: rosa-configuring-pid-limits
591+
Distros: openshift-rosa
591592
---
592593
Name: Security and compliance
593594
Dir: security

_topic_maps/_topic_map_rosa_hcp.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -552,9 +552,9 @@ Topics:
552552
# File: rosa-cluster-auth
553553
# - Name: Authorization and RBAC
554554
# File: rosa-auth-rbac
555-
- Name: Cluster notifications
556-
File: rosa-cluster-notifications
557-
Distros: openshift-rosa-hcp
555+
- Name: Cluster notifications
556+
File: rosa-cluster-notifications
557+
Distros: openshift-rosa-hcp
558558
# - Name: Configuring private connections
559559
# Dir: cloud_infrastructure_access
560560
# Distros: openshift-rosa-hcp
@@ -584,8 +584,9 @@ Topics:
584584
# File: rosa-nodes-about-autoscaling-nodes
585585
# - Name: Configuring cluster memory to meet container memory and risk requirements
586586
# File: nodes-cluster-resource-configure
587-
# - Name: Configuring PID limits
588-
# File: rosa-configuring-pid-limits
587+
- Name: Configuring PID limits
588+
File: rosa-configuring-pid-limits
589+
Distros: openshift-rosa
589590
# ---
590591
# Name: Security and compliance
591592
# Dir: security
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_cluster_admin/rosa-configuring-pid-limits.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="removing-custom-config-from-cluster_{context}"]
7+
= Removing custom configuration from a cluster
8+
9+
You can remove custom configuration from your cluster by removing the `KubeletConfig` object that contains the configuration details.
10+
11+
.Prerequisites
12+
* You have an existing {product-title} cluster.
13+
* You have installed the ROSA CLI (rosa).
14+
* You have logged in to your Red Hat account by using the ROSA CLI.
15+
16+
.Procedure
17+
18+
* Remove custom configuration from the cluster by deleting the relevant custom `KubeletConfig` object:
19+
+
20+
[source,terminal]
21+
----
22+
$ rosa delete kubeletconfig --cluster <cluster_name> --name <kubeletconfig_name>
23+
----
24+
25+
.Verification steps
26+
* Confirm that the custom `KubeletConfig` object is not listed for the cluster:
27+
+
28+
[source,terminal]
29+
----
30+
$ rosa describe kubeletconfig --name <cluster_name>
31+
----
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_cluster_admin/rosa-configuring-pid-limits.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="removing-custom-config-from-machinepool_{context}"]
7+
= Removing custom configuration from a machine pool
8+
9+
You can remove custom configuration on your machine pools by removing the `KubeletConfig` object that contains the configuration details.
10+
11+
.Prerequisites
12+
* You have an existing {product-title} cluster.
13+
* You have installed the ROSA CLI (rosa).
14+
* You have logged in to your Red Hat account by using the ROSA CLI.
15+
16+
.Procedure
17+
18+
* Edit the machine pool and set the `--kubeletconfigs` parameter so that the `KubeletConfig` object you want to remove is omitted.
19+
+
20+
To remove all `KubeletConfig` objects from the machine pool, set an empty value for the `--kubeletconfigs` parameter, for example:
21+
+
22+
[source,terminal]
23+
----
24+
$ rosa edit machinepool -c <cluster_name> --kubeletconfigs="" --name <machinepool_name>
25+
----
26+
27+
.Verification steps
28+
* Confirm that the `KubeletConfig` object you removed is not visible in the machine pool description:
29+
+
30+
[source,terminal]
31+
----
32+
$ rosa describe machinepool --cluster <cluster_name> --name <machinepool_name>
33+
----

modules/rosa-create-objects.adoc

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -645,12 +645,19 @@ $ rosa create ingress --cluster=mycluster --label-match=foo=bar,bar=baz
645645
[id="rosa-create-kubeletconfig_{context}"]
646646
== create kubeletconfig
647647

648-
Create a custom `KubeletConfig` object for the cluster.
648+
Create a custom `KubeletConfig` object to allow custom configuration of nodes in a machine pool. For {product-title} clusters, these settings are cluster-wide. For {hcp-title-first} clusters, each machine pool can be configured differently.
649+
//TODO OSDOCS-10439: Add conditions back when HCP and Classic are published separately
650+
// ifdef::openshift-rosa-classic[]
651+
// cluster.
652+
// endif::openshift-rosa-classic[]
653+
// ifdef::openshift-rosa-hcp[]
654+
// machine pool.
655+
// endif::openshift-rosa-hcp[]
649656

650657
.Syntax
651658
[source,terminal]
652659
----
653-
$ rosa create kubeletconfig --cluster=<cluster_name|cluster_id> --pod-pids-limit=<number> [flags]
660+
$ rosa create kubeletconfig --cluster=<cluster_name|cluster_id> --name=<kubeletconfig_name> --pod-pids-limit=<number> [flags]
654661
----
655662

656663
.Flags
@@ -659,10 +666,27 @@ $ rosa create kubeletconfig --cluster=<cluster_name|cluster_id> --pod-pids-limit
659666
|Option |Definition
660667

661668
|--pod-pids-limit <number>
662-
|Required. The maximum number of PIDs for the cluster.
669+
a|Required. The maximum number of PIDs for each node in the machine pool associated with the `KubeletConfig` object.
670+
//TODO OSDOCS-10439: Add conditions back when HCP and Classic are published separately
671+
// ifdef::openshift-rosa-classic[]
672+
// cluster.
673+
// endif::openshift-rosa-classic[]
674+
// ifdef::openshift-rosa-hcp[]
675+
// machine pool associated with the `KubeletConfig` object.
676+
// endif::openshift-rosa-hcp[]
663677

664678
a|-c, --cluster <cluster_name>\|<cluster_id>
665-
|Required. The name or ID of the cluster for which the `KubeletConfig` object will be created.
679+
|Required. The name or ID of the cluster in which to create the `KubeletConfig` object.
680+
681+
|--name
682+
a| Required for {hcp-title-first} clusters. Optional for {product-title}, as there is only one `KubeletConfig` for the cluster. Specifies a name for the `KubeletConfig` object.
683+
//TODO OSDOCS-10439: Add conditions back when HCP and Classic are published separately
684+
// ifdef::openshift-rosa-classic[]
685+
// Optional.
686+
// endif::openshift-rosa-classic[]
687+
// ifdef::openshift-rosa-hcp[]
688+
// Required.
689+
// endif::openshift-rosa-hcp[]
666690

667691
|-i, --interactive
668692
|Enable interactive mode.
@@ -702,6 +726,12 @@ a|--cluster <cluster_name>\|<cluster_id>
702726
|--instance-type
703727
|The instance type (string) that should be used. Default: `m5.xlarge`
704728

729+
//TODO OSDOCS-10439: Add conditions back when HCP and Classic are published separately
730+
//ifdef::openshift-rosa-hcp[]
731+
a|--kubelet-configs <kubeletconfig_name>
732+
| For {hcp-title-first} clusters, the names of any `KubeletConfig` objects to apply to nodes in a machine pool.
733+
//endif::openshift-rosa-hcp[]
734+
705735
|--labels
706736
|The labels (string) for the machine pool. The format must be a comma-delimited list of key=value pairs. This list overwrites any modifications made to node labels on an ongoing basis.
707737

modules/rosa-delete-objects.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,16 @@ a|-c, --cluster <cluster_name>\|<cluster_id>
285285
|-h, --help
286286
|Shows help for this command.
287287

288+
|--name
289+
a| Required for {hcp-title-first} clusters. Optional for {product-title}, as there is only one `KubeletConfig` for the cluster. Specifies a name for the `KubeletConfig` object.
290+
//TODO OSDOCS-10439: Add conditions back when HCP and Classic are published separately
291+
// ifdef::openshift-rosa-classic[]
292+
// Optional.
293+
// endif::openshift-rosa-classic[]
294+
// ifdef::openshift-rosa-hcp[]
295+
// Required.
296+
// endif::openshift-rosa-hcp[]
297+
288298
|-y, --yes
289299
|Automatically answers `yes` to confirm the operation.
290300

modules/rosa-edit-objects.adoc

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,19 @@ $ rosa edit ingress --lb-type=nlb --cluster=mycluster apps2
171171
[id="rosa-edit-kubeletconfig_{context}"]
172172
== edit kubeletconfig
173173

174-
Edit a custom `KubeletConfig` object in a cluster.
174+
Edit a custom `KubeletConfig` object in a machine pool.
175+
//TODO OSDOCS-10439: Add conditions back when HCP and Classic are published separately
176+
// ifdef::openshift-rosa-classic[]
177+
// cluster.
178+
// endif::openshift-rosa-classic[]
179+
// ifdef::openshift-rosa-hcp[]
180+
// machine pool.
181+
// endif::openshift-rosa-hcp[]
175182

176183
.Syntax
177184
[source,terminal]
178185
----
179-
$ rosa edit kubeletconfig --cluster=<cluster_name|cluster_id> --pod-pids-limit=<number> [flags]
186+
$ rosa edit kubeletconfig --cluster=<cluster_name|cluster_id> --name=<kubeletconfig_name> --pod-pids-limit=<number> [flags]
180187
----
181188

182189
.Flags
@@ -191,7 +198,24 @@ a|-c, --cluster <cluster_name>\|<cluster_id>
191198
|Enable interactive mode.
192199

193200
|--pod-pids-limit <number>
194-
|Required. The maximum number of PIDs for the cluster.
201+
a|Required. The maximum number of PIDs for each node in the machine pool associated with the `KubeletConfig` object.
202+
//TODO OSDOCS-10439: Add conditions back when HCP and Classic are published separately
203+
// ifdef::openshift-rosa-classic[]
204+
// cluster.
205+
// endif::openshift-rosa-classic[]
206+
// ifdef::openshift-rosa-hcp[]
207+
// machine pool associated with the `KubeletConfig` object.
208+
// endif::openshift-rosa-hcp[]
209+
210+
|--name
211+
a| Required for {hcp-title-first} clusters. Optional for {product-title}, as there is only one `KubeletConfig` for the cluster. Specifies a name for the `KubeletConfig` object.
212+
//TODO OSDOCS-10439: Add conditions back when HCP and Classic are published separately
213+
// ifdef::openshift-rosa-classic[]
214+
// Optional.
215+
// endif::openshift-rosa-classic[]
216+
// ifdef::openshift-rosa-hcp[]
217+
// Required.
218+
// endif::openshift-rosa-hcp[]
195219

196220
|-h, --help
197221
|Shows help for this command.
@@ -224,6 +248,12 @@ $ rosa edit machinepool --cluster=<cluster_name> | <cluster_id> <machinepool_ID>
224248
|--labels
225249
|The labels (string) for the machine pool. The format must be a comma-delimited list of key=value pairs. Editing this value only affects newly created nodes of the machine pool, which are created by increasing the node number, and does not affect the existing nodes. This list overwrites any modifications made to node labels on an ongoing basis.
226250

251+
//TODO OSDOCS-10439: Add conditions back when HCP and Classic are published separately
252+
//ifdef::openshift-rosa-hcp[]
253+
a|--kubelet-configs <kubeletconfig_name>
254+
| For {hcp-title-first} clusters, the names of any `KubeletConfig` objects to apply to nodes in a machine pool.
255+
//endif::openshift-rosa-hcp[]
256+
227257
|--max-replicas
228258
|Specifies the maximum number of compute nodes when enabling autoscaling.
229259

@@ -287,3 +317,10 @@ Modify the autoscaling range on a machine pool named `mp1` on a cluster named `m
287317
----
288318
$ rosa edit machinepool --max-replicas=9 --cluster=mycluster --name=mp1
289319
----
320+
321+
Associate a `KubeletConfig` object with an existing machine pool on a {hcp-title-first} cluster.
322+
323+
[source,terminal]
324+
----
325+
$ rosa edit machinepool -c mycluster --kubelet-configs=set-high-pids --name high-pid-pool
326+
----

modules/rosa-list-objects.adoc

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,49 @@ List all instance types.
287287
$ rosa list instance-types
288288
----
289289

290+
[id="rosa-list-kubeletconfigs_{context}"]
291+
== list kubeletconfigs
292+
293+
List the `KubeletConfig` objects configured on a cluster.
294+
295+
.Syntax
296+
[source,terminal]
297+
----
298+
$ rosa list kubeletconfigs --cluster=<cluster_name> | <cluster_id> [arguments]
299+
----
300+
301+
.Arguments
302+
[cols="30,70"]
303+
|===
304+
|Option |Definition
305+
306+
|--cluster
307+
|Required: The name or ID (string) of the cluster that the machine pools will be listed for.
308+
|===
309+
310+
.Optional arguments inherited from parent commands
311+
[cols="30,70"]
312+
|===
313+
|Option |Definition
314+
315+
|--help
316+
|Shows help for this command.
317+
318+
|--debug
319+
|Enables debug mode.
320+
321+
// |--profile
322+
// |Specifies an AWS profile (string) from your credentials file.
323+
|===
324+
325+
.Example
326+
List all of the `KubeletConfig` objects on a cluster named `mycluster`.
327+
328+
[source,terminal]
329+
----
330+
$ rosa list kubeletconfigs --cluster=mycluster
331+
----
332+
290333
[id="rosa-list-machinepools_{context}"]
291334
== list machinepools
292335

@@ -671,6 +714,16 @@ a|-c, --cluster <cluster_name>\|<cluster_id>
671714
|-h, --help
672715
|Shows help for this command.
673716

717+
|--name
718+
a| Optional. Specifies the name of the `KubeletConfig` object to describe.
719+
//TODO OSDOCS-10439: Add conditions back when HCP and Classic are published separately
720+
// ifdef::openshift-rosa-classic[]
721+
// Optional.
722+
// endif::openshift-rosa-classic[]
723+
// ifdef::openshift-rosa-hcp[]
724+
// Required.
725+
// endif::openshift-rosa-hcp[]
726+
674727
|-o, --output string
675728
|The output format. You can specify either `json` or `yaml`.
676729

modules/setting-higher-pid-limit-on-existing-cluster.adoc

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="setting-higher-pid-limit-on-existing-cluster_{context}"]
7-
= Setting a higher PID limit on an existing {product-title} cluster
7+
= Setting a higher process ID limit on an existing {product-title} cluster
88

9-
You can set a higher `podPidsLimit` on an existing {product-title} cluster by creating or editing a `KubeletConfig` object that changes the `--pod-pids-limit` parameter.
9+
You can set a higher `podPidsLimit` on an existing {product-title} (ROSA) cluster by creating or editing a `KubeletConfig` object that changes the `--pod-pids-limit` parameter.
1010

1111
[IMPORTANT]
1212
====
@@ -15,39 +15,35 @@ Changing the `podPidsLimit` on an existing cluster will trigger non-control plan
1515

1616
.Prerequisites
1717

18-
* You have a ROSA Classic cluster.
19-
+
20-
--
21-
:FeatureName: Configuring the maximum number of PIDs
22-
include::snippets/rosa-classic-support.adoc[]
23-
--
18+
* You have a {product-title} cluster.
19+
* You have installed the ROSA CLI (`rosa`).
2420
* You have installed the OpenShift CLI (`oc`).
2521
* You have logged in to your Red Hat account by using the ROSA CLI.
2622
2723
.Procedure
28-
2924
. Create or edit the `KubeletConfig` object to change the PID limit.
3025
+
3126
--
3227
** If this is the first time you are changing the default PID limit, create the `KubeletConfig` object and set the `--pod-pids-limit` value by running the following command:
3328
+
3429
[source,terminal]
3530
----
36-
$ rosa create kubeletconfig -c <cluster_name> --pod-pids-limit=<value>
31+
$ rosa create kubeletconfig -c <cluster_name> --name <kubeletconfig_name> --pod-pids-limit=<value>
3732
----
3833
+
34+
NOTE: The `--name` parameter is optional on ROSA Classic clusters, because only one `KubeletConfig` object is supported per ROSA Classic cluster.
35+
+
3936
For example, the following command sets a maximum of 16,384 PIDs per pod for cluster `my-cluster`:
4037
+
4138
[source,terminal]
4239
----
43-
$ rosa create kubeletconfig -c my-cluster --pod-pids-limit=16384
40+
$ rosa create kubeletconfig -c my-cluster --name set-high-pids --pod-pids-limit=16384
4441
----
45-
4642
** If you previously created a `KubeletConfig` object, edit the existing `KubeletConfig` object and set the `--pod-pids-limit` value by running the following command:
4743
+
4844
[source,terminal]
4945
----
50-
$ rosa edit kubeletconfig -c <cluster_name> --pod-pids-limit=<value>
46+
$ rosa edit kubeletconfig -c <cluster_name> --name <kubeletconfig_name> --pod-pids-limit=<value>
5147
----
5248
--
5349
+
@@ -85,4 +81,4 @@ The new PIDs limit appears in the output, as shown in the following example:
8581
[source,terminal]
8682
----
8783
Pod Pids Limit: 16384
88-
----
84+
----

0 commit comments

Comments
 (0)