Compare languages | The deckhouse module: usage

Setting up the update mode

Настройка режима обновления

You can manage DKP updates in the following ways:

Управлять обновлением DKP можно следующими способами:

  • С помощью параметра settings.update ModuleConfig deckhouse;
  • С помощью секции параметров disruptions NodeGroup.

Update windows configuration

Конфигурация окон обновлений

You can configure the time windows when Deckhouse will automatically install updates in the following ways:

Управлять временными окнами, когда Deckhouse будет устанавливать обновления автоматически, можно следующими способами:

  • в параметре update.windows ModuleConfig deckhouse, для общего управления обновлениями;
  • в параметрах disruptions.automatic.windows и disruptions.rollingUpdate.windows NodeGroup, для управления обновлениями, которые могут привести к кратковременному простою в работе системных компонентов.

An example of setting up two daily update windows — from 8 a.m. to 10 a.m. and from 8 p.m. to 10 p.m. (UTC):

Пример настройки двух ежедневных окон обновлений: с 8:00 до 10:00 и c 20:00 до 22:00 (UTC):

yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: deckhouse spec: version: 1 settings: releaseChannel: EarlyAccess update: windows:

  • from: “8:00” to: “10:00”
  • from: “20:00” to: “22:00”

yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: deckhouse spec: version: 1 settings: releaseChannel: EarlyAccess update: windows:

  • from: “8:00” to: “10:00”
  • from: “20:00” to: “22:00”

You can also set up updates on certain days, for example, on Tuesdays and Saturdays from 6 p.m. to 7:30 p.m. (UTC):

Также можно настроить обновления в определенные дни, например по вторникам и субботам с 18:00 до 19:30 (UTC):

yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: deckhouse spec: version: 1 settings: releaseChannel: Stable update: windows:

  • from: “18:00” to: “19:30” days:
  • Tue
  • Sat

yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: deckhouse spec: version: 1 settings: releaseChannel: Stable update: windows:

  • from: “18:00” to: “19:30” days:
  • Tue
  • Sat

Manual update confirmation

Ручное подтверждение обновлений

Manual confirmation of Deckhouse version updates is provided in the following cases:

  • The Deckhouse update confirmation mode is enabled.

Ручное подтверждение обновления версии Deckhouse предусмотрено в следующих случаях:

  • Включен режим подтверждения обновлений Deckhouse.

This means that the parameter settings.update.mode in the ModuleConfig deckhouse is set to Manual (confirmation for both patch and minor versions of Deckhouse) or AutoPatch (confirmation for the minor version of Deckhouse). Run the following command to confirm the update (use the corresponding Deckhouse version):

Это значит, что параметр settings.update.mode ModuleConfig deckhouse установлен в Manual (подтверждение как patch-версии, так и минорной версии Deckhouse) или в AutoPatch (подтверждение минорной версии Deckhouse). Для подтверждения обновления выполните следующую команду (укажите необходимую версию Deckhouse):

shell kubectl patch DeckhouseRelease --type=merge -p='{"approved": true}'

shell kubectl patch DeckhouseRelease --type=merge -p='{"approved": true}'

  • If automatic application of disruptive updates is disabled for a node group.
  • Если для какой-либо группы узлов отключено автоматическое применение обновлений, которые могут привести к кратковременному простою в работе системных компонентов.

This means that the corresponding NodeGroup has the parameter spec.disruptions.approvalMode set to Manual.

Это значит, что у NodeGroup, соответствующего группе узлов, установлен параметр spec.disruptions.approvalMode в Manual.

For updating each node in such a group, the node must have update.node.deckhouse.io/disruption-approved= annotation. Example:

Для обновления каждого узла в такой группе на узел нужно установить аннотацию update.node.deckhouse.io/disruption-approved=. Пример:

shell kubectl annotate node ${NODE_1} update.node.deckhouse.io/disruption-approved=

shell kubectl annotate node ${NODE_1} update.node.deckhouse.io/disruption-approved=

Deckhouse update notifications

Оповещение об обновлении Deckhouse

In the Auto update mode, you can configure a webhook call to receive a notification about an upcoming minor Deckhouse version update.

В режиме обновлений Auto можно настроить вызов вебхука для получения оповещения о предстоящем обновлении минорной версии Deckhouse.

In addition, notifications are generated not only for Deckhouse updates but also for updates of any modules, including their individual updates.
In some cases, the system may initiate the sending of multiple notifications at once (10–20 notifications) at approximately 15-second intervals.

Кроме того, оповещения формируются не только при обновлении Deckhouse, но и при обновлении любых модулей, включая их отдельные обновления. В отдельных случаях система может инициировать отправку нескольких оповещений одновременно (по 10–20 оповещений) с интервалом около 15 секунд.

Notifications are available only in the Auto update mode; in the Manual mode they are not generated.

Оповещения доступны только в режиме обновлений Auto, в режиме Manual они не формируются.

Specifying a webhook is optional: if the update.notification.webhook parameter is not set but the update.notification.minimalNotificationTime parameter is specified, the update will still be postponed for the specified period. In this case, the appearance of a DeckhouseRelease resource in the cluster with the name of the new version can be considered the notification of its availability.

Вебхук указывать не обязательно: если параметр update.notification.webhook не задан, но указано время в параметре update.notification.minimalNotificationTime, применение новой версии всё равно будет отложено на указанный период. В этом случае оповещением о появлении новой версии можно считать появление в кластере ресурса DeckhouseRelease с именем новой версии.

Notifications are sent only once for a specific update. If something goes wrong (for example, the webhook receives incorrect data), they will not be resent automatically. To resend the notification, you must delete the corresponding DeckhouseRelease resource.

Оповещения отправляются только один раз для конкретного обновления. Если что-то пошло не так (например, вебхук получил некорректные данные), повторная отправка автоматически не произойдёт. Чтобы отправить оповещение повторно, необходимо удалить соответствующий ресурс DeckhouseRelease.

Example of notification configuration:

Пример настройки оповещения:

yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: deckhouse spec: version: 1 settings: update: releaseChannel: Stable mode: Auto notification: webhook: https://release-webhook.mydomain.com

yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: deckhouse spec: version: 1 settings: update: releaseChannel: Stable mode: Auto notification: webhook: https://release-webhook.mydomain.com

After a new minor Deckhouse version appears on the selected update channel, but before it is applied in the cluster, a POST request will be sent to the configured webhook address.

После появления новой минорной версии Deckhouse на используемом канале обновлений, но до момента применения ее в кластере на адрес вебхука будет выполнен POST-запрос.

The minimalNotificationTime parameter allows you to postpone the update installation for the specified period, providing time to react to the notification while respecting update windows. If the webhook is unavailable, each failed attempt to send the notification will postpone the update by the same duration, which may lead to the update being deferred indefinitely.

Параметр minimalNotificationTime позволяет отложить установку обновления на заданный период, обеспечивая время для реакции на оповещение с учётом окон обновлений. Если при этом вебхук недоступен, каждая неудачная попытка отправки будет сдвигать время применения на ту же величину, что может привести к бесконечному откладыванию обновления.

Example:

Пример:

yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: deckhouse spec: version: 1 settings: update: releaseChannel: Stable mode: Auto notification: webhook: https://release-webhook.mydomain.com minimalNotificationTime: 8h

yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: deckhouse spec: version: 1 settings: update: releaseChannel: Stable mode: Auto notification: webhook: https://release-webhook.mydomain.com minimalNotificationTime: 8h

Collect debug info

Сбор информации для отладки

Read the FAQ to learn more about collecting debug information.

О сборе отладочной информации читайте в FAQ.