Skip to content

Commit

Permalink
feat(docs): added info about deploying bundles as helm chart dependen…
Browse files Browse the repository at this point in the history
…cies

Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
  • Loading branch information
distorhead committed May 6, 2022
1 parent 091383e commit 188ec71
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 2 deletions.
30 changes: 29 additions & 1 deletion docs/pages_en/advanced/bundles.md
Expand Up @@ -36,12 +36,40 @@ When publishing a bundle by the tag which already exists in the container regist

## Bundles deployment

Bundle published into the container registry could be deployed into the kubernetes by the werf.
Bundle published into the container registry could be deployed into the kubernetes by the werf with one of the following ways:
1. With `werf bundle apply` command directly from container registry.
2. From another werf project as helm chart dependency.

### Deploy with werf bundle apply

[werf-bundle-apply]({{ "/reference/cli/werf_bundle_apply.html" | true_relative_url }}) command used to deploy a published bundle version into the kubernetes. This command **does not need a project git directory** to run, because bundle contains all needed files and images to deploy an application. This command accepts params which is analogous to [werf-converge]({{ "/reference/cli/werf_converge.html" | true_relative_url }}) command. For `werf bundle apply` you should explicitly specify Helm release name (`--release`) and namespace to be used for deployment (`--namespace`).

[Values for helm chart]({{ "/advanced/helm/configuration/values.html" | true_relative_url }}), [annotations and labels]({{ "/advanced/helm/deploy_process/annotating_and_labeling.html" | true_relative_url }}) which has been passed to the [werf-bundle-apply]({{ "/reference/cli/werf_bundle_apply.html" | true_relative_url }}) command will be united with the values, annotations and labels, which has been passed during publication of the bundle being applied.

### Deploy as helm chart dependency

Configure dependency in the target werf project `.helm/Chart.yaml`:

```yaml
apiVersion: v2
dependencies:
- name: project
repository: "oci://ghcr.io/group"
version: 1.4.x
```

Update project chart dependencies (this command will actualize `.helm/Chart.lock`):

```
werf helm dependency update .helm
```

Deploy project with dependencies:

```
werf converge --repo ghcr.io/group/otherproject
```

### Versioning during deployment

User may choose a version of deployed bundle with `--tag` parameter. By default, bundle with the `latest` tag will be deployed.
Expand Down
30 changes: 29 additions & 1 deletion docs/pages_ru/advanced/bundles.md
Expand Up @@ -36,12 +36,40 @@ werf позволяет разделить процесс выпуска нов

## Выкат бандлов

Бандл, опубликованный в container registry, можно выкатить в kubernetes с помощью werf.
Бандл, опубликованный в container registry, можно выкатить в kubernetes с помощью werf одним из следующих путей:
1. С помощью команды `werf bundle apply` напрямую из container registry.
2. Из другого проекта werf в качестве зависимого helm-чарта.

### Выкат с помощью werf bundle apply

Выкат опубликованного бандла осуществляется с помощью команды [`werf bundle apply`]({{ "/reference/cli/werf_bundle_apply.html" | true_relative_url }}). Команда **не требует доступа к git** (бандл содержит все необходимые файлы и образы для выката приложения), и принимает параметры по аналогии с [`werf converge`]({{ "/reference/cli/werf_converge.html" | true_relative_url }}). Для `werf bundle apply` необходимо явно указывать имя создаваемого Helm-релиза (`--release`) и namespace, в который будет совершён выкат (`--namespace`).

Переданные [values для helm chart]({{ "/advanced/helm/configuration/values.html" | true_relative_url }}), [аннотаций и лейблов для ресурсов]({{ "/advanced/helm/deploy_process/annotating_and_labeling.html" | true_relative_url }}) будут объединены с теми values, аннотациями и лейблами, которые были указаны при публикации бандлов и зашиты в него.

### Выкат в качестве зависимого helm-чарта

Настраиваем зависимость в целевом werf-проекте в файле `.helm/Chart.yaml`:

```yaml
apiVersion: v2
dependencies:
- name: project
repository: "oci://ghcr.io/group"
version: 1.4.x
```

Обновляем зависимости проекта (данная команда актуализирует файл `.helm/Chart.lock`):

```
werf helm dependency update .helm
```

Выкатываем проект с зависимостями:

```
werf converge --repo ghcr.io/group/otherproject
```

### Версионирование при выкате

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

0 comments on commit 188ec71

Please sign in to comment.