Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helm documentation #896 #1435

Merged
merged 2 commits into from
Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/home/HOWTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
- [How to test the central logging features](./howto/KUBERNETES.md#how-to-test-the-central-logging-features)
- [How to tunnel Kubernetes dashboard from remote kubectl to your PC](./howto/KUBERNETES.md#how-to-tunnel-kubernetes-dashboard-from-remote-kubectl-to-your-pc)

- [Helm](./howto/HELM.md)
- [Helm charts in repository](./howto/HELM.md#helm-charts-in-repository)
- [Installing Helm charts from repository](./howto/HELM.md#installing-helm-charts-from-repository)

- [Upgrade](./howto/UPGRADE.md)
- [Offline upgrade](./howto/UPGRADE.md#offline-upgrade)
- [How to upgrade Kafka cluster](./howto/UPGRADE.md#how-to-upgrade-Kafka-cluster)
Expand Down
78 changes: 78 additions & 0 deletions docs/home/howto/HELM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
## Helm charts in repository


System Helm charts are stored in the following location:

`roles/helm_charts/files/system`

There is also dedicated Helm charts location for users

`roles/helm_charts/files/user`

- Currently user part has no automation implemented. It will need some additional "options" via epi client but it needs discussion with wider audience about the needs.

Implementator/developer maintain system path content.
All chart should be added in directories (not archived)

Repository role is responsible for retrieving mentioned Helm charts. It copies all the directories, archive them (`.tgz`), generates helm index file and serve in apache server.



## Installing Helm charts from repository

Installation of particular Helm charts is performed in separate role. Each other particular role that needs to install Helm chart has to trigger separate single helm chart installation task:
`roles/helm/tasks/install-chart.yml`



Single Helm installation task is responsible for installing already existing charts from repository.

It is possible to overwrite chart values within the specification config.
Single helm chart task expects 3 parameters to be passed:

```yaml
disable_helm_chart:
helm_chart_name:
helm_chart_values:
```

Example usage:

```yaml
---
- name: Set Helm chart values from custom configuration
set_fact:
_helm_chart_values: "{{ specification.helm_chart_values }}"
when: specification.helm_chart_values is defined
- name: Set Helm chart name from custom configuration
set_fact:
_helm_chart_name: "{{ specification.helm_chart_name }}"
when: specification.helm_chart_name is defined
- name: Set Helm chart disable flag from custom configuration
set_fact:
_disable_helm_chart: "{{ specification.disable_helm_chart }}"
when: specification.disable_helm_chart is defined
- name: Mychart
include_role:
name: helm
tasks_from: install-chart
vars:
disable_helm_chart: "{{ _disable_helm_chart }}"
helm_chart_name: "{{ _helm_chart_name }}"
helm_chart_values: "{{ _helm_chart_values }}"
```

Example config:

```yaml
kind: configuration/helm-mychart
title: "Helm mychart"
name: default
specification:
helm_chart_name: mychart
disable_helm_chart: false
helm_chart_values:
service:
port: 8080
nameOverride: mychart_custom_name
```