Skip to content

Commit

Permalink
Add readiness init container docs
Browse files Browse the repository at this point in the history
Signed-off-by: Mykola Morhun <[email protected]>
  • Loading branch information
mmorhun committed Oct 18, 2021
1 parent 208dfee commit 1a6bd0b
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/administration-guide/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
* xref:migration-from-postgresql-9-to-postgresql-13.adoc[]
* xref:enabling-readiness-init-containers.adoc[]
* xref:caching-images-for-faster-workspace-start.adoc[]
** xref:defining-the-list-of-images-to-pull.adoc[]
** xref:defining-the-memory-parameters-for-the-image-puller.adoc[]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[id="enabling-readiness-init-containers"]
:navtitle: Enabling readiness init containers
:keywords: init-container, startup
:page-aliases: .:enabling-readiness-init-containers

include::partial$assembly_enabling-readiness-init-containers.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:parent-context-of-assembly_enabling-readiness-init-containers: {context}

[id="assembly_enabling-readiness-init-containers_{context}"]
= Enabling readiness init containers

:context: assembly_enabling-startup-init-containers

Normally, {prod-short} Operator installs {prod} and starts its containers in the right order.
However, if a node with {prod-short} gets restarted, than all {prod-short} containers start simultaneously and some might fail as dependent component might not be ready yet.
To handle such a case, one should enable readiness init containers for {prod-short} components.

Choose the procedure depending on installer type:

* xref:enabling-readiness-init-containers.adoc#enabling-readiness-init-containers-for-operator-installer_{context}[]
* xref:enabling-readiness-init-containers.adoc#enabling-readiness-init-containers-for-olm-installer_{context}[]

include::partial$proc_enabling-readiness-init-containers-for-operator-installer.adoc[leveloffset=+1]
include::partial$proc_enabling-readiness-init-containers-for-olm-installer.adoc[leveloffset=+1]

:context: {arent-context-of-assembly_enabling-startup-init-containers}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
:_module-type: PROCEDURE

[id="enabling-readiness-init-containers-for-olm-installer_{context}"]
= Enabling readiness init containers for OLM installer

This section describes how to enable (disable) components readiness init containers for {prod-short} in case of OLM installer.

.Prerequisites

. {prod} installed with OLM installer.

.Procedure

. Find {prod-short} Operator subscription name:
+
```sh
$ {orch-cli} get subscriptions -n {prod-namespace}
```

. Find CSV name in {prod-short} Operator subscription:
+
```sh
$ {orch-cli} get subscription <subscription-name> -n {prod-namespace} -o yaml | grep installedCSV
```

. Edit the CSV
+
```sh
$ {orch-cli} edit csv <csv-name> -n {prod-namespace}
```
+
by adding (removing) the following:
+
```yaml
- name: ADD_COMPONENT_READINESS_INIT_CONTAINERS
value: "true"
```

. Wait while {prod-short} Operator restarts some components.

[NOTE]
When {prod} version is updated, OLM will create a new CSV and the procedure above should be repeated.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
:_module-type: PROCEDURE

[id="enabling-readiness-init-containers-for-operator-installer_{context}"]
= Enabling readiness init containers for Operator installer

This section describes how to enable (disable) components readiness init containers for {prod-short} in case of Operator installer.

.Prerequisites

. {prod} installed with Operator installer.

.Procedure

. Find {prod-short} Operator deployment name.

. Edit the deployment by adding `ADD_COMPONENT_READINESS_INIT_CONTAINERS` environment variable.
Insert (remove) the following under `spec.template.spec.containers[0].env` section of the Operator deployment:
+
```yaml
- name: ADD_COMPONENT_READINESS_INIT_CONTAINERS
value: "true"
```

. Wait while {prod-short} Operator restarts some components.

0 comments on commit 1a6bd0b

Please sign in to comment.