/
krepost
/
deckhouse
Обзор
Документация
Войти
/
krepost
/
deckhouse
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docs/documentation/_includes/module-bundle.liquid
65 строк
3 KB
Denis Rebenok
[docs] Refactored module enabling and configuration instructions in the documentation (#17231)
07 янв 2026, 16:39
Не верифицирован
07 янв 2026, 16:39
9f47eea
Код
Авторство
О чём код?
{%- assign moduleName = page.dir | regex_replace: "^.*/[0-9]+\-([a-z-]+)/$", "\1" %} {%- assign moduleSnakeName = page['module-snake-name'] %} {%- assign moduleKebabName = page['module-kebab-name'] %} {%- assign bundlesEnabledCount = 0 %} {%- assign bundlesDisabledCount = 0 %} {%- for bundle in site.data.bundles.bundleNames %} {%- if site.data.bundles.byModule[moduleKebabName][bundle] == 'true' %} {%- if bundlesEnabledList.size > 0 %} {%- assign bundlesEnabledList = bundlesEnabledList | append: '`, `' %} {%- endif %} {%- assign bundlesEnabledCount = bundlesEnabledCount | plus: 1 %} {%- assign bundlesEnabledList = bundlesEnabledList | append: bundle %} {%- else %} {%- if bundlesDisabledList.size > 0 %} {%- assign bundlesDisabledList = bundlesDisabledList | append: '`, `' %} {%- endif %} {%- assign bundlesDisabledCount = bundlesDisabledCount | plus: 1 %} {%- assign bundlesDisabledList = bundlesDisabledList | append: bundle %} {%- endif %} {%- endfor %} {%- if bundlesEnabledCount > 0 %} {%- if bundlesEnabledCount > 1 %} {% if page.lang == 'ru' -%} Модуль **включен** по умолчанию в [наборах модулей](/products/kubernetes-platform/documentation/v1/admin/configuration/#наборы-модулей) {%- else -%} The module is **enabled** by default in the following [bundles](/products/kubernetes-platform/documentation/v1/admin/configuration/#module-bundles) {%- endif %}: `{{ bundlesEnabledList }}`. {%- else %} {% if page.lang == 'ru' -%} Модуль **включен** по умолчанию в [наборе модулей](/products/kubernetes-platform/documentation/v1/admin/configuration/#наборы-модулей) `{{ bundlesEnabledList }}`. {%- else -%} The module is **enabled** by default in the `{{ bundlesEnabledList }}` [bundle](/products/kubernetes-platform/documentation/v1/admin/configuration/#module-bundles). {%- endif %} {%- endif %} {%- else %} {% if page.lang == 'ru' -%} Модуль не включен по умолчанию в каком-либо [наборе модулей](/products/kubernetes-platform/documentation/v1/admin/configuration/#наборы-модулей). {%- else -%} The module is not enabled by default in any [bundles](/products/kubernetes-platform/documentation/v1/admin/configuration/#module-bundles). {%- endif %} {%- endif %} {%- if bundlesDisabledCount > 0 and bundlesEnabledCount > 0 %} {%- if bundlesDisabledCount > 1 %} {% if page.lang == 'ru' -%} Модуль **выключен** по умолчанию в [наборах модулей](/products/kubernetes-platform/documentation/v1/admin/configuration/#наборы-модулей) {%- else -%} The module is **disabled** by default in the following [bundles](/products/kubernetes-platform/documentation/v1/admin/configuration/#module-bundles) {%- endif %}: `{{ bundlesDisabledList }}`. {%- else %} {% if page.lang == 'ru' -%} Модуль **выключен** по умолчанию в [наборе модулей](/products/kubernetes-platform/documentation/v1/admin/configuration/#наборы-модулей) `{{ bundlesDisabledList }}`. {%- else -%} The module is **disabled** by default in the `{{ bundlesDisabledList }}` [bundle](/products/kubernetes-platform/documentation/v1/admin/configuration/#module-bundles). {%- endif %} {%- endif %} {%- endif %}