Skip to content

Commit 3b08599

Browse files
authored
Merge pull request #62704 from mburke5678/nodes-container-fix-errors
Nodes Containers docs fixes during ROSA review
2 parents b58e38c + 43195b6 commit 3b08599

19 files changed

+239
-158
lines changed

modules/nodes-cluster-enabling-features-cli.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ apiVersion: config.openshift.io/v1
3636
kind: FeatureGate
3737
metadata:
3838
name: cluster <1>
39+
# ...
3940
spec:
4041
featureSet: TechPreviewNoUpgrade <2>
4142
----

modules/nodes-cluster-enabling-features-console.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ apiVersion: config.openshift.io/v1
3535
kind: FeatureGate
3636
metadata:
3737
name: cluster <1>
38-
....
39-
38+
# ...
4039
spec:
4140
featureSet: TechPreviewNoUpgrade <2>
4241
----

modules/nodes-cluster-worker-latency-profiles-using.adoc

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -57,41 +57,11 @@ metadata:
5757
spec:
5858
workerLatencyProfile: MediumUpdateAverageReaction <1>
5959
60-
...
60+
# ...
6161
----
6262
<1> Specifies the medium worker latency policy.
6363
+
6464
Scheduling on each worker node is disabled as the change is being applied.
65-
+
66-
When all nodes return to the `Ready` condition, you can use the following command to look in the Kubernetes Controller Manager to ensure it was applied:
67-
+
68-
[source,terminal]
69-
----
70-
$ oc get KubeControllerManager -o yaml | grep -i workerlatency -A 5 -B 5
71-
----
72-
+
73-
.Example output
74-
[source,terminal]
75-
----
76-
...
77-
- lastTransitionTime: "2022-07-11T19:47:10Z"
78-
reason: ProfileUpdated
79-
status: "False"
80-
type: WorkerLatencyProfileProgressing
81-
- lastTransitionTime: "2022-07-11T19:47:10Z" <1>
82-
message: all static pod revision(s) have updated latency profile
83-
reason: ProfileUpdated
84-
status: "True"
85-
type: WorkerLatencyProfileComplete
86-
- lastTransitionTime: "2022-07-11T19:20:11Z"
87-
reason: AsExpected
88-
status: "False"
89-
type: WorkerLatencyProfileDegraded
90-
- lastTransitionTime: "2022-07-11T19:20:36Z"
91-
status: "False"
92-
...
93-
----
94-
<1> Specifies that the profile is applied and active.
9565

9666
. Optional: Move to the low worker latency profile:
9767

@@ -128,11 +98,43 @@ metadata:
12898
spec:
12999
workerLatencyProfile: LowUpdateSlowReaction <1>
130100
131-
...
101+
# ...
132102
----
133103
<1> Specifies to use the low worker latency policy.
134104
+
135105
Scheduling on each worker node is disabled as the change is being applied.
136106

107+
.Verification
108+
109+
* When all nodes return to the `Ready` condition, you can use the following command to look in the Kubernetes Controller Manager to ensure it was applied:
110+
+
111+
[source,terminal]
112+
----
113+
$ oc get KubeControllerManager -o yaml | grep -i workerlatency -A 5 -B 5
114+
----
115+
+
116+
.Example output
117+
[source,terminal]
118+
----
119+
# ...
120+
- lastTransitionTime: "2022-07-11T19:47:10Z"
121+
reason: ProfileUpdated
122+
status: "False"
123+
type: WorkerLatencyProfileProgressing
124+
- lastTransitionTime: "2022-07-11T19:47:10Z" <1>
125+
message: all static pod revision(s) have updated latency profile
126+
reason: ProfileUpdated
127+
status: "True"
128+
type: WorkerLatencyProfileComplete
129+
- lastTransitionTime: "2022-07-11T19:20:11Z"
130+
reason: AsExpected
131+
status: "False"
132+
type: WorkerLatencyProfileDegraded
133+
- lastTransitionTime: "2022-07-11T19:20:36Z"
134+
status: "False"
135+
# ...
136+
----
137+
<1> Specifies that the profile is applied and active.
138+
137139
To change the low profile to medium or change the medium to low, edit the `node.config` object and set the `spec.workerLatencyProfile` parameter to the appropriate value.
138140

modules/nodes-containers-copying-files-about.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ $ oc rsync <source> <destination> [-c <container>]
1919
Specifying the Copy Source::
2020
The source argument of the `oc rsync` command must point to either a local
2121
directory or a pod directory. Individual files are not supported.
22-
22+
+
2323
When specifying a pod directory the directory name must be prefixed with the pod
2424
name:
25-
25+
+
2626
[source,terminal]
2727
----
2828
<pod name>:<dir>
2929
----
30-
30+
+
3131
If the directory name ends in a path separator (`/`), only the contents of the directory are copied to the destination. Otherwise, the
3232
directory and its contents are copied to the destination.
3333

@@ -44,11 +44,11 @@ Continuous Syncing on File Change::
4444
Using the `--watch` option causes the command to monitor the source path for any
4545
file system changes, and synchronizes changes when they occur. With this
4646
argument, the command runs forever.
47-
47+
+
4848
Synchronization occurs after short quiet periods to ensure a
4949
rapidly changing file system does not result in continuous synchronization
5050
calls.
51-
51+
+
5252
When using the `--watch` option, the behavior is effectively the same as
5353
manually invoking `oc rsync` repeatedly, including any arguments normally passed
5454
to `oc rsync`. Therefore, you can control the behavior via the same flags used

modules/nodes-containers-copying-files-procedure.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,18 @@ Support for copying local files to or from a container is built into the CLI.
1212

1313
When working with `oc rsync`, note the following:
1414

15-
rsync must be installed::
16-
The `oc rsync` command uses the local `rsync` tool if present on the client
15+
* rsync must be installed. The `oc rsync` command uses the local `rsync` tool, if present on the client
1716
machine and the remote container.
18-
17+
+
1918
If `rsync` is not found locally or in the remote container, a *tar* archive
2019
is created locally and sent to the container where the *tar* utility is used to
2120
extract the files. If *tar* is not available in the remote container, the
2221
copy will fail.
23-
22+
+
2423
The *tar* copy method does not provide the same functionality as `oc rsync`. For
2524
example, `oc rsync` creates the destination directory if it does not exist and
2625
only sends files that are different between the source and the destination.
27-
26+
+
2827
[NOTE]
2928
====
3029
In Windows, the `cwRsync` client should be installed and added to the PATH for

modules/nodes-containers-copying-files-rsync.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ environment variable as a workaround, as follows:
1313

1414
[source,terminal]
1515
----
16-
$ rsync --rsh='oc rsh' --exclude-from=FILE SRC POD:DEST
16+
$ rsync --rsh='oc rsh' --exclude-from=<file_name> <local-dir> <pod-name>:/<remote-dir>
1717
----
1818

1919
or:
@@ -29,7 +29,7 @@ Then, run the rsync command:
2929

3030
[source,terminal]
3131
----
32-
$ rsync --exclude-from=FILE SRC POD:DEST
32+
$ rsync --exclude-from=<file_name> <local-dir> <pod-name>:/<remote-dir>
3333
----
3434

3535
Both of the above examples configure standard `rsync` to use `oc rsh` as its

modules/nodes-containers-downward-api-container-configmaps.adoc

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ so image and application authors can create an image for specific environments.
1111

1212
.Procedure
1313

14-
. Create a `*_configmap.yaml_*` file:
14+
. Create a config map with the values to inject:
15+
16+
.. Create a `*_configmap.yaml_*` file similar to the following:
1517
+
1618
[source,yaml]
1719
----
@@ -23,14 +25,16 @@ data:
2325
mykey: myvalue
2426
----
2527

26-
. Create a `ConfigMap` object from the `*_configmap.yaml_*` file:
28+
.. Create the config map from the `configmap.yaml` file:
2729
+
2830
[source,terminal]
2931
----
3032
$ oc create -f configmap.yaml
3133
----
3234

33-
. Create a `*_pod.yaml_*` file that references the above `ConfigMap` object:
35+
. Create a pod that references the above config map:
36+
37+
.. Create a `pod.yaml` file similar to the following:
3438
+
3539
[source,yaml]
3640
----
@@ -50,16 +54,19 @@ spec:
5054
name: myconfigmap
5155
key: mykey
5256
restartPolicy: Always
57+
# ...
5358
----
5459

55-
. Create the pod from the `*_pod.yaml_*` file:
60+
.. Create the pod from the `pod.yaml` file:
5661
+
5762
[source,terminal]
5863
----
5964
$ oc create -f pod.yaml
6065
----
6166

62-
. Check the container's logs for the `MY_CONFIGMAP_VALUE` value:
67+
.Verification
68+
69+
* Check the container's logs for the `MY_CONFIGMAP_VALUE` value:
6370
+
6471
[source,terminal]
6572
----

modules/nodes-containers-downward-api-container-envars.adoc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ string.
1313

1414
.Procedure
1515

16-
. Create a `*_pod.yaml_*` file that references an existing `environment variable`:
16+
. Create a pod that references an existing environment variable:
17+
18+
.. Create a `pod.yaml` file similar to the following:
1719
+
1820
[source,yaml]
1921
----
@@ -32,16 +34,19 @@ spec:
3234
- name: MY_ENV_VAR_REF_ENV
3335
value: $(MY_EXISTING_ENV)
3436
restartPolicy: Never
37+
# ...
3538
----
3639

37-
. Create the pod from the `*_pod.yaml_*` file:
40+
.. Create the pod from the `*_pod.yaml_*` file:
3841
+
3942
[source,terminal]
4043
----
4144
$ oc create -f pod.yaml
4245
----
4346

44-
. Check the container's logs for the `MY_ENV_VAR_REF_ENV` value:
47+
.Verification
48+
49+
* Check the container's logs for the `MY_ENV_VAR_REF_ENV` value:
4550
+
4651
[source,terminal]
4752
----

modules/nodes-containers-downward-api-container-escaping.adoc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ of the provided value.
1212

1313
.Procedure
1414

15-
. Create a `*_pod.yaml_*` file that references an existing `environment variable`:
15+
. Create a pod that references an existing environment variable:
16+
17+
.. Create a `pod.yaml` file similar to the following:
1618
+
1719
[source,yaml]
1820
----
@@ -29,16 +31,19 @@ spec:
2931
- name: MY_NEW_ENV
3032
value: $$(SOME_OTHER_ENV)
3133
restartPolicy: Never
34+
# ...
3235
----
3336

34-
. Create the pod from the `*_pod.yaml_*` file:
37+
.. Create the pod from the `*_pod.yaml_*` file:
3538
+
3639
[source,terminal]
3740
----
3841
$ oc create -f pod.yaml
3942
----
4043

41-
. Check the container's logs for the `MY_NEW_ENV` value:
44+
.Verification
45+
46+
* Check the container's logs for the `MY_NEW_ENV` value:
4247
+
4348
[source,terminal]
4449
----

modules/nodes-containers-downward-api-container-resources-envars.adoc

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,28 @@
99
When creating pods, you can use the Downward API to inject information about
1010
computing resource requests and limits using environment variables.
1111

12+
When creating the pod configuration, specify environment variables that
13+
correspond to the contents of the `resources` field in the `*spec.container*`
14+
field.
15+
16+
[NOTE]
17+
====
18+
If the resource limits are not included in the container configuration, the
19+
downward API defaults to the node's CPU and memory allocatable values.
20+
====
21+
1222
.Procedure
1323

14-
To use environment variables:
24+
. Create a new pod spec that contains the resources you want to inject:
1525

16-
. When creating a pod configuration, specify environment variables that
17-
correspond to the contents of the `resources` field in the `*spec.container*`
18-
field:
26+
.. Create a `pod.yaml` file similar to the following:
1927
+
2028
[source,yaml]
2129
----
22-
....
30+
apiVersion: v1
31+
kind: Pod
32+
metadata:
33+
name: dapi-env-test-pod
2334
spec:
2435
containers:
2536
- name: test-container
@@ -49,13 +60,10 @@ spec:
4960
valueFrom:
5061
resourceFieldRef:
5162
resource: limits.memory
52-
....
63+
# ...
5364
----
54-
+
55-
If the resource limits are not included in the container configuration, the
56-
downward API defaults to the node's CPU and memory allocatable values.
5765

58-
. Create the pod from the `*_pod.yaml_*` file:
66+
.. Create the pod from the `pod.yaml` file:
5967
+
6068
[source,terminal]
6169
----

0 commit comments

Comments
 (0)