Compare languages | Модуль deckhouse: примеры конфигурации

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

Setting up the update mode

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

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

You can manage DKP updates in the following ways:

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

Update windows configuration

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

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

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

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

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):

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”

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

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):

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

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

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

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

  • The Deckhouse update confirmation mode is enabled.

Это значит, что параметр settings.update.mode ModuleConfig deckhouse установлен в Manual (подтверждение как patch-версии, так и минорной версии Deckhouse) или в AutoPatch (подтверждение минорной версии 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):

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.

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

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

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

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

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

Deckhouse update notifications

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

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

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

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.

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

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

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

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.

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

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

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

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

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.

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

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.

Пример:

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

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

Read the FAQ to learn more about collecting debug information.