diff --git a/modules/administration-guide/nav.adoc b/modules/administration-guide/nav.adoc index a4aeb35a60..579a9ffe10 100644 --- a/modules/administration-guide/nav.adoc +++ b/modules/administration-guide/nav.adoc @@ -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[] diff --git a/modules/administration-guide/pages/enabling-readiness-init-containers.adoc b/modules/administration-guide/pages/enabling-readiness-init-containers.adoc new file mode 100644 index 0000000000..587fc52dca --- /dev/null +++ b/modules/administration-guide/pages/enabling-readiness-init-containers.adoc @@ -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[] diff --git a/modules/administration-guide/partials/assembly_enabling-readiness-init-containers.adoc b/modules/administration-guide/partials/assembly_enabling-readiness-init-containers.adoc new file mode 100644 index 0000000000..b52fa81808 --- /dev/null +++ b/modules/administration-guide/partials/assembly_enabling-readiness-init-containers.adoc @@ -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} diff --git a/modules/administration-guide/partials/proc_enabling-readiness-init-containers-for-olm-installer.adoc b/modules/administration-guide/partials/proc_enabling-readiness-init-containers-for-olm-installer.adoc new file mode 100644 index 0000000000..06f1d69740 --- /dev/null +++ b/modules/administration-guide/partials/proc_enabling-readiness-init-containers-for-olm-installer.adoc @@ -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 -n {prod-namespace} -o yaml | grep installedCSV +``` + +. Edit the CSV ++ +```sh +$ {orch-cli} edit csv -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. diff --git a/modules/administration-guide/partials/proc_enabling-readiness-init-containers-for-operator-installer.adoc b/modules/administration-guide/partials/proc_enabling-readiness-init-containers-for-operator-installer.adoc new file mode 100644 index 0000000000..d3d6985322 --- /dev/null +++ b/modules/administration-guide/partials/proc_enabling-readiness-init-containers-for-operator-installer.adoc @@ -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.