Skip to content

Commit

Permalink
docs(bundles): added bundle file structure chapter
Browse files Browse the repository at this point in the history
Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
  • Loading branch information
distorhead committed Oct 21, 2022
1 parent 231da83 commit 189ec01
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
43 changes: 43 additions & 0 deletions docs/pages_en/advanced/bundles.md
Expand Up @@ -28,6 +28,49 @@ werf-bundle-publish command consists of:
- saving of passed [helm chart values]({{ "/advanced/helm/configuration/values.html" | true_relative_url }}) params in the published bundle;
- saving of passed [annotations and labels]({{ "/advanced/helm/deploy_process/annotating_and_labeling.html" | true_relative_url }}) in the published bundle.

### Bundle structure

Before publication we have a regular chart in werf project, which looks like follows:

```
.helm/
Chart.yaml
LICENSE
README.md
values.yaml
values.schema.json
templates/
crds/
charts/
files/
```

Only specified above files and directories will be packaged into bundle during publication by default.

`.helm/files` is conventional directory which should contain configuration files which used in the `.Files.Get` and `.Files.Glob` directives.

`.helm/values.yaml` will be merged with werf's internal service values and another custom values and sets passed to the publish command and then saved into resulting bundle file `values.yaml`. Using of default `.helm/values.yaml` can be disabled with `--disable-default-values` option passed to `werf bundle publish` (in such case resulting bundle `values.yaml` would still exist in the published bundle and contain merged service values and another custom values and sets passwed to the publish command).

Published bundle file structure looks like follows:

```
Chart.yaml
LICENSE
README.md
values.yaml
values.schema.json
templates/
crds/
charts/
files/
extra_annotations.json
extra_labels.json
```

Note `extra_annotations.json` and `extra_labels.json` service werf's files, which used to store default extra annotations and labels that should be appended to each deployed resource when applying bundle with the `werf bundle apply` command.

To download and inspect published bundle use `werf bundle copy --from REPO:TAG --to archive:PATH_TO_ARCHIVE.tar.gz` command.

### Versioning during publication

User may choose a version of published bundle with `--tag` parameter. By default, bundle published with the `latest` tag.
Expand Down
42 changes: 42 additions & 0 deletions docs/pages_ru/advanced/bundles.md
Expand Up @@ -28,6 +28,48 @@ werf позволяет разделить процесс выпуска нов
- werf запомнит в опубликованном бандле переданные параметры [values для helm chart]({{ "/advanced/helm/configuration/values.html" | true_relative_url }});
- werf запомнит в опубликованном бандле переданные параметры [аннотаций и лейблов для ресурсов]({{ "/advanced/helm/deploy_process/annotating_and_labeling.html" | true_relative_url }})

### Структура bundle

Перед публикацией имеется следующая структура чарта в обычном werf-проекте:

```
.helm/
Chart.yaml
LICENSE
README.md
values.yaml
values.schema.json
templates/
crds/
charts/
files/
```

По умолчанию в бандл будут запакованы только указанные выше файлы и директории.

`.helm/files` — это общепринятая директория для хранения конфигурационных файлов и шаблонов, которые используются в таких директивах как `.Files.Get` и `.Files.Glob` для вставки контента файлов в шаблоны ресурсов.
`.helm/values.yaml` будет совмещён с внутренними сервисными значениями werf и с другими нестандартными values указанными параметрами при вызове команды публикации бандла, совмещенные values будут записаны в `values.yaml` файл внутри бандла. Использование стандартного `.helm/values.yaml` можно отключить опцией `--disable-default-values` для команды `werf bundle publish` (в этом случае в бандле всё равно будет опубликован `values.yaml` файл, но он не будет содержать values из `.helm/values.yaml`).

Структура опубликованного чарта в бандле выглядит следующим образом:

```
Chart.yaml
LICENSE
README.md
values.yaml
values.schema.json
templates/
crds/
charts/
files/
extra_annotations.json
extra_labels.json
```

Обращаем внимание на файлы `extra_annotations.json` и `extra_labels.json` — это сервисные файлы, хранящие аннотации и лейблы зашитые в бандл, которые будут добавлены во все ресурсы релиза при выкате бандла через команду `werf bundle apply`.

Чтобы скачаь и проинспектировать структуру опубликованного бандла используется следующая команда: `werf bundle copy --from REPO:TAG --to archive:PATH_TO_ARCHIVE.tar.gz`.

### Версионирование при публикации

При публикации бандла пользователь может выбрать версию с помощью параметра `--tag`. По умолчанию бандл публикуется с тегом `latest`.
Expand Down

0 comments on commit 189ec01

Please sign in to comment.