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

Пример конфигурации модуля

Usage

Ниже представлен простой пример конфигурации модуля:

Below is a simple example of the module configuration:

yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: deckhouse spec: version: 1 settings: logLevel: Debug bundle: Minimal releaseChannel: EarlyAccess

yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: deckhouse spec: version: 1 settings: logLevel: Debug bundle: Minimal releaseChannel: EarlyAccess

Также можно настроить дополнительные параметры.

You can also configure additional parameters.

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

Setting up the update mode

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

Deckhouse will update as soon as a new release will be created if update windows are not set and the update mode is Auto.

Patch-версии (например, обновления с 1.26.1 до 1.26.2) устанавливаются без подтверждения и без учета окон обновлений.

Patch versions (e.g. updates from 1.26.1 to 1.26.2) are installed without confirmation and without taking into account update windows.

Вы также можете настраивать окна disruption-обновлений узлов в custom resource’ах NodeGroup (параметр disruptions.automatic.windows).

You can also configure node disruption update window in custom resource NodeGroup (the disruptions.automatic.windows parameter).

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

Update windows configuration

Настроить время, когда Deckhouse будет устанавливать обновления, можно в параметре update.windows конфигурации модуля.

You can configure the time when Deckhouse will install updates by using the update.windows module configuration parameter.

Пример настройки двух ежедневных окон обновлений: с 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

При необходимости возможно включить ручное подтверждение обновлений. Сделать это можно следующим образом:

If necessary, it is possible to enable manual confirmation of updates. This can be done as follows:

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

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

В этом режиме необходимо подтверждать каждое минорное обновление Deckhouse (без учета patch-версий).

In this mode, it will be necessary to confirm each minor Deckhouse updates (excluding patch versions).

Пример подтверждения обновления на версию v1.43.2:

Manual confirmation of the update to the version v1.43.2:

shell kubectl patch DeckhouseRelease v1.43.2 –type=merge -p=’{“approved”: true}’

shell kubectl patch DeckhouseRelease v1.43.2 –type=merge -p=’{“approved”: true}’

Ручное подтверждение потенциально опасных (disruptive) обновлений

Manual disruption update confirmation

При необходимости возможно включить ручное подтверждение потенциально опасных (disruptive) обновлений (которые меняют значения по умолчанию или поведение некоторых модулей). Сделать это можно следующим образом:

If necessary, it is possible to enable manual confirmation of disruptive updates (updates that change the default values or behavior). This can be done as follows:

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

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

В этом режиме необходимо подтверждать каждое минорное потенциально опасное (disruptive) обновление Deckhouse (без учета patch-версий) с помощью аннотации release.deckhouse.io/disruption-approved=true на соответствующем ресурсе DeckhouseRelease.

In this mode, it will be necessary to confirm each minor disruptive update with the release.deckhouse.io/disruption-approved=true annotation on the DeckhouseRelease resource.

Пример подтверждения минорного потенциально опасного обновления Deckhouse v1.36.4:

An example of confirmation of a potentially dangerous Deckhouse minor update v1.36.4:

shell kubectl annotate DeckhouseRelease v1.36.4 release.deckhouse.io/disruption-approved=true

shell kubectl annotate DeckhouseRelease v1.36.4 release.deckhouse.io/disruption-approved=true

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

Deckhouse update notification

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

In the Auto update mode, you can set up a webhook call, to be notified of an upcoming Deckhouse minor version update.

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

An 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

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 на используемом канале обновлений, но до момента применения ее в кластере на адрес webhook’а будет выполнен POST-запрос.

After a new Deckhouse minor version appears on the update channel, a POST request will be executed to the webhook’s URL before it is applied in the cluster.

Чтобы всегда иметь достаточно времени для реакции на оповещение об обновлении Deckhouse, достаточно настроить параметр minimalNotificationTime. В этом случае обновление случится по прошествии указанного времени с учетом окон обновлений.

Set the minimalNotificationTime parameter to have enough time to react to a Deckhouse update notification. In this case, the update will happen after the specified time, considering the update windows.

Пример:

An 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

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

If you do not specify the address in the update.notification.webhook parameter, but specify the time in the update.notification.minimalNotificationTime parameter, then the release will still be postponed for at least the time specified in the minimalNotificationTime parameter. In this case, the notification of the appearance of a new version can be considered the appearance of a DeckhouseRelease resource with a name corresponding to the new version.

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

Collect debug info

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

Read the FAQ to learn more about collecting debug information.