Skip to content

Commit c658a13

Browse files
authored
Merge pull request #86378 from mburke5678/nodes-crun-default
OSDOCS11063: Make crun the default runtime for OpenShift
2 parents a97c342 + 066b818 commit c658a13

File tree

5 files changed

+30
-14
lines changed

5 files changed

+30
-14
lines changed

modules/architecture-machine-roles.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ In a Kubernetes cluster, worker nodes run and manage the actual workloads reques
5050
* CRI-O, which is the container engine.
5151
* kubelet, which is the service that accepts and fulfills requests for running and stopping container workloads.
5252
* A service proxy, which manages communication for pods across workers.
53-
* The runC or crun low-level container runtime, which creates and runs containers.
53+
* The crun or runC low-level container runtime, which creates and runs containers.
5454

5555
[NOTE]
5656
====
57-
For information about how to enable crun instead of the default runC, see the documentation for creating a `ContainerRuntimeConfig` CR.
57+
For information about how to enable runC instead of the default crun, see the documentation for creating a `ContainerRuntimeConfig` CR.
5858
====
5959

6060
In {product-title}, compute machine sets control the compute machines, which are assigned the `worker` machine role. Machines with the `worker` role drive compute workloads that are governed by a specific machine pool that autoscales them. Because {product-title} has the capacity to support multiple machine types, the machines with the `worker` role are classed as _compute_ machines. In this release, the terms _worker machine_ and _compute machine_ are used interchangeably because the only default type of compute machine is the worker machine. In future versions of {product-title}, different types of compute machines, such as infrastructure machines, might be used by default.

modules/create-a-containerruntimeconfig-crd.adoc

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The CRI-O flag is applied on the cgroup of the container, while the Kubelet flag
2525
* **Log level**: The `logLevel` parameter sets the CRI-O `log_level` parameter, which is the level of verbosity for log messages. The default is `info` (`log_level = info`). Other options include `fatal`, `panic`, `error`, `warn`, `debug`, and `trace`.
2626
* **Overlay size**: The `overlaySize` parameter sets the CRI-O Overlay storage driver `size` parameter, which is the maximum size of a container image.
2727
* **Maximum log size**: Setting the maximum log size in the `ContainerRuntimeConfig` is expected to be deprecated. If a maximum log size is required, it is recommended to use the `containerLogMaxSize` field in the `KubeletConfig` CR instead.
28-
* **Container runtime**: The `defaultRuntime` parameter sets the container runtime to either `runc` or `crun`. The default is `runc`.
28+
* **Container runtime**: The `defaultRuntime` parameter sets the container runtime to either `crun` or `runc`. The default is `crun`.
2929
3030
You should have one `ContainerRuntimeConfig` CR for each machine config pool with all the config changes you want for that pool. If you are applying the same content to all the pools, you only need one `ContainerRuntimeConfig` CR for all the pools.
3131

@@ -74,7 +74,7 @@ $ oc get mc | grep container
7474
...
7575
----
7676

77-
The following example sets the `log_level` field to `debug` and sets the overlay size to 8 GB:
77+
The following example sets the `log_level` field to `debug`, sets the overlay size to 8 GB, and configures runC as the container runtime:
7878

7979
.Example `ContainerRuntimeConfig` CR
8080
[source,yaml]
@@ -90,12 +90,12 @@ spec:
9090
containerRuntimeConfig:
9191
logLevel: debug <2>
9292
overlaySize: 8G <3>
93-
defaultRuntime: "crun" <4>
93+
defaultRuntime: "runc" <4>
9494
----
9595
<1> Specifies the machine config pool label. For a container runtime config, the role must match the name of the associated machine config pool.
9696
<2> Optional: Specifies the level of verbosity for log messages.
9797
<3> Optional: Specifies the maximum size of a container image.
98-
<4> Optional: Specifies the container runtime to deploy to new containers. The default value is `runc`.
98+
<4> Optional: Specifies the container runtime to deploy to new containers, either `crun` or `runc`. The default value is `crun`.
9999

100100
.Procedure
101101

@@ -116,6 +116,7 @@ spec:
116116
containerRuntimeConfig: <2>
117117
logLevel: debug
118118
overlaySize: 8G
119+
defaultRuntime: "runc"
119120
----
120121
<1> Specify a label for the machine config pool that you want you want to modify.
121122
<2> Set the parameters as needed.
@@ -197,15 +198,15 @@ sh-4.4# crio config | grep 'log_level'
197198
log_level = "debug"
198199
----
199200

200-
.. Verify the changes in the `storage.conf`file:
201+
.. Verify the changes in the `storage.conf` file:
201202
+
202203
[source,terminal]
203204
----
204205
sh-4.4# head -n 7 /etc/containers/storage.conf
205206
----
206207
+
207208
.Example output
208-
+
209+
[source,terminal]
209210
----
210211
[storage]
211212
driver = "overlay"
@@ -215,3 +216,18 @@ sh-4.4# head -n 7 /etc/containers/storage.conf
215216
additionalimagestores = []
216217
size = "8G"
217218
----
219+
220+
.. Verify the changes in the `crio/crio.conf.d/01-ctrcfg-defaultRuntime` file:
221+
+
222+
[source,terminal]
223+
----
224+
sh-5.1# cat /etc/crio/crio.conf.d/01-ctrcfg-defaultRuntime
225+
----
226+
+
227+
.Example output
228+
[source,terminal]
229+
----
230+
[crio]
231+
[crio.runtime]
232+
default_runtime = "runc"
233+
----

modules/nodes-pods-user-namespaces-configuring.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Enabling the `TechPreviewNoUpgrade` feature set on your cluster cannot be undone
3535
+
3636
After you save the changes, new machine configs are created, the machine config pools are updated, and scheduling on each node is disabled while the change is being applied.
3737
38-
* You enabled the crun container runtime on the worker nodes. crun is currently the only released OCI runtime with support for user namespaces.
38+
* The crun container runtime is present on the worker nodes. crun is currently the only OCI runtime packaged with {product-title} that supports user namespaces. crun is active by default.
3939
+
4040
[source,yaml]
4141
----
@@ -50,7 +50,7 @@ spec:
5050
containerRuntimeConfig:
5151
defaultRuntime: crun <2>
5252
----
53-
<1> Specifies the machine config pool label.
53+
<1> Specifies the machine config pool label.
5454
<2> Specifies the container runtime to deploy.
5555
5656
.Procedure

modules/rhcos-about.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The following list describes key features of the {op-system} operating system:
2525

2626
* **CRI-O container runtime**: Although {op-system} contains features for running the OCI- and libcontainer-formatted containers that Docker requires, it incorporates the CRI-O container engine instead of the Docker container engine. By focusing on features needed by Kubernetes platforms, such as {product-title}, CRI-O can offer specific compatibility with different Kubernetes versions. CRI-O also offers a smaller footprint and reduced attack surface than is possible with container engines that offer a larger feature set. At the moment, CRI-O is the only engine available within {product-title} clusters.
2727
+
28-
CRI-O can use either the runC or crun container runtime to start and manage containers. For information about how to enable crun, see the documentation for creating a `ContainerRuntimeConfig` CR.
28+
CRI-O can use either the crun or runC container runtime to start and manage containers. crun is the default. For information about how to enable runC, see the documentation for creating a `ContainerRuntimeConfig` CR.
2929

3030
* **Set of container tools**: For tasks such as building, copying, and otherwise managing containers, {op-system} replaces the Docker CLI tool with a compatible set of container tools. The podman CLI tool supports many container runtime features, such as running, starting, stopping, listing, and removing containers and container images. The skopeo CLI tool can copy, authenticate, and sign images. You can use the `crictl` CLI tool to work with containers and pods from the CRI-O container engine. While direct use of these tools in {op-system} is discouraged, you can use them for debugging purposes.
3131

nodes/containers/nodes-containers-using.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ The {product-title} documentation uses the term _container runtime_ to refer to
5050
====
5151

5252
ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
53-
{product-title} uses CRI-O as the container engine and runC or crun as the container runtime. The default container runtime is runC. Both container runtimes adhere to the link:https://www.opencontainers.org/[Open Container Initiative (OCI)] runtime specifications.
53+
{product-title} uses CRI-O as the container engine and runC or crun as the container runtime. The default container runtime is crun. Both container runtimes adhere to the link:https://www.opencontainers.org/[Open Container Initiative (OCI)] runtime specifications.
5454

5555
include::snippets/about-crio-snippet.adoc[]
5656

57-
runC, developed by Docker and maintained by the Open Container Project, is a lightweight, portable container runtime written in Go. crun, developed by Red Hat, is a fast and low-memory container runtime fully written in C. As of {product-title} {product-version}, you can select between the two.
57+
crun, developed by Red Hat, is a fast and low-memory container runtime fully written in C. runC, developed by Docker and maintained by the Open Container Project, is a lightweight, portable container runtime written in Go.
5858

5959
crun has several improvements over runC, including:
6060

@@ -74,5 +74,5 @@ For information on setting which container runtime to use, see xref:../../machin
7474
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
7575

7676
ifdef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
77-
{product-title} uses CRI-O as the container engine and runC or crun as the container runtime. The default container runtime is runC.
77+
{product-title} uses CRI-O as the container engine and crun or runC as the container runtime. The default container runtime is crun.
7878
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]

0 commit comments

Comments
 (0)