Skip to content

Commit 3dd831c

Browse files
author
Michael Burke
committed
OCDOCS 62865 provide meaningful examples for NDP
1 parent 304548c commit 3dd831c

File tree

3 files changed

+25
-27
lines changed

3 files changed

+25
-27
lines changed

modules/machine-config-node-disruption-config.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ spec:
5858
- restart:
5959
serviceName: crio.service
6060
type: Restart
61-
name: test.service
61+
name: sshd.service
6262
----
6363
<1> Specifies the node disruption policy.
6464
<2> Specifies a list of machine config file definitions and actions to take to changes on those paths. This list supports a maximum of 50 entries.
@@ -117,7 +117,7 @@ status:
117117
- restart:
118118
serviceName: crio.service
119119
type: Restart
120-
name: test.se
120+
name: test.service
121121
# ...
122122
----
123123
<1> Specifies the current cluster-validated policies.

modules/machine-config-node-disruption-example.adoc

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,27 @@ status:
7373

7474
The default node disruption policy does not contain a policy for changes to the `/etc/containers/registries.conf.d` file. This is because both {product-title} and {op-system-base-full} use the `registries.conf.d` file to specify aliases for image short names. It is recommended that you always pull an image by its fully-qualified name. This is particularly important with public registries, because the image might not deploy if the public registry requires authentication. You can create a user-defined policy to use with the `/etc/containers/registries.conf.d` file, if you need to use image short names.
7575

76-
In the following example, when changes are made to the SSH keys, the MCO drains the cluster nodes, reloads the `crio.service`, reloads the systemd configuration, and restarts the `crio-service`.
76+
In the following example, when changes are made to the `registries.conf.d` file, the MCO restarts the `crio-service`.
77+
78+
.Example node disruption policy for a change to the `registries.conf` file
79+
[source,yaml]
80+
----
81+
apiVersion: operator.openshift.io/v1
82+
kind: MachineConfiguration
83+
metadata:
84+
name: cluster
85+
namespace: openshift-machine-config-operator
86+
spec:
87+
nodeDisruptionPolicy:
88+
files:
89+
- path: /etc/containers/registries.conf.d
90+
actions:
91+
- type: Restart
92+
- restart:
93+
serviceName: crio.service
94+
----
95+
96+
In the following example, when changes are made to the SSH keys, the MCO reloads the systemd configuration, and restarts the `crio-service`.
7797

7898
.Example node disruption policy for an SSH key change
7999
[source,yaml]
@@ -87,14 +107,10 @@ spec:
87107
nodeDisruptionPolicy:
88108
sshkey:
89109
actions:
90-
- type: Drain
91-
- reload:
92-
serviceName: crio.service
93-
type: Reload
94110
- type: DaemonReload
95111
- restart:
96112
serviceName: crio.service
97-
type: Restart
113+
type: Restart
98114
# ...
99115
----
100116

@@ -145,21 +161,3 @@ spec:
145161
restart:
146162
serviceName: crio.service
147163
----
148-
149-
In the following example, when changes are made to the `registries.conf` file, such as by editing an `ImageContentSourcePolicy` (ICSP) object, the MCO does not drain or reboot the nodes and applies the changes with no further action.
150-
151-
.Example node disruption policy for a registries.conf file change
152-
[source,yaml]
153-
----
154-
apiVersion: operator.openshift.io/v1
155-
kind: MachineConfiguration
156-
metadata:
157-
name: cluster
158-
# ...
159-
spec:
160-
nodeDisruptionPolicy:
161-
files:
162-
- actions:
163-
- type: None
164-
path: /etc/containers/registries.conf
165-
----

snippets/machine-config-node-disruption-actions.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ When you make any of these changes, the node disruption policy determines which
1111
* *Reload*: For services, the MCO reloads the specified services without restarting the service.
1212
* *Restart*: For services, the MCO fully restarts the specified services.
1313
* *DaemonReload*: The MCO reloads the systemd manager configuration.
14-
* *Special*: This is an internal MCO-only action and cannot be set by the user.
14+
* *Special*: This is an internal MCO-only action that is set by default for changes to the `/etc/containers/registries.conf` file. When this action is set, the MCO determines if a node cordon and drain is required, based on the changed content in the `registries.conf` file. You can override this default. However, it is not recommended to override this setting. You cannot set this action for another path or service.
1515
1616
[NOTE]
1717
====

0 commit comments

Comments
 (0)