-
Notifications
You must be signed in to change notification settings - Fork 1.8k
OCDOCS 62865 provide meaningful examples for NDP #100815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mburke5678
wants to merge
2
commits into
openshift:main
Choose a base branch
from
mburke5678:mco-meaningful-ndp-examples
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mburke5678 marked this conversation as resolved.
Show resolved
Hide resolved
mburke5678 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,11 +2,12 @@ | |
| // | ||
| // * machine_configuration/machine-config-node-disruption_machine-configs-configure.adoc | ||
|
|
||
| :_mod-docs-content-type: PROCEDURE | ||
| :_mod-docs-content-type: REFERENCE | ||
| [id="machine-config-node-disruption-example_{context}"] | ||
| = Example node disruption policies | ||
|
|
||
| The following example `MachineConfiguration` objects contain a node disruption policy. | ||
| [role="_abstract"] | ||
| You can use the following example `MachineConfiguration` objects to help you create contain a node disruption policy that can help reduce disruption to the workloads in your cluster. | ||
|
|
||
| [TIP] | ||
| ==== | ||
|
|
@@ -73,7 +74,27 @@ status: | |
|
|
||
| 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. | ||
|
|
||
| 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`. | ||
| In the following example, when changes are made to the `registries.conf.d` file, the MCO restarts the `crio-service`. | ||
|
|
||
| .Example node disruption policy for a change to the `registries.conf` file | ||
mburke5678 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| [source,yaml] | ||
| ---- | ||
| apiVersion: operator.openshift.io/v1 | ||
| kind: MachineConfiguration | ||
| metadata: | ||
| name: cluster | ||
| namespace: openshift-machine-config-operator | ||
| spec: | ||
| nodeDisruptionPolicy: | ||
| files: | ||
| - path: /etc/containers/registries.conf.d | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is targeting a different location than the one stated by the description above |
||
| actions: | ||
| - type: Restart | ||
| - restart: | ||
| serviceName: crio.service | ||
| ---- | ||
|
|
||
| In the following example, when changes are made to the SSH keys, the MCO reloads the systemd configuration, and restarts the `crio-service`. | ||
|
|
||
| .Example node disruption policy for an SSH key change | ||
| [source,yaml] | ||
|
|
@@ -87,14 +108,10 @@ spec: | |
| nodeDisruptionPolicy: | ||
| sshkey: | ||
| actions: | ||
| - type: Drain | ||
| - reload: | ||
| serviceName: crio.service | ||
| type: Reload | ||
| - type: DaemonReload | ||
| - restart: | ||
| serviceName: crio.service | ||
| type: Restart | ||
| type: Restart | ||
| # ... | ||
| ---- | ||
|
|
||
|
|
@@ -145,21 +162,3 @@ spec: | |
| restart: | ||
| serviceName: crio.service | ||
| ---- | ||
|
|
||
| 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. | ||
|
|
||
| .Example node disruption policy for a registries.conf file change | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: operator.openshift.io/v1 | ||
| kind: MachineConfiguration | ||
| metadata: | ||
| name: cluster | ||
| # ... | ||
| spec: | ||
| nodeDisruptionPolicy: | ||
| files: | ||
| - actions: | ||
| - type: None | ||
| path: /etc/containers/registries.conf | ||
| ---- | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.