---
# System prepended metadata

title: Helm introduction
tags: [Kubernetes]

---

---
title: Helm introduction
tags: Kubernetes
description: 
---

<style>
.reveal {
  font-size: 26px;
}
</style>

- slides: 
- documentation:
    - [Helm](https://helm.sh/docs/)

---

### What is it?

- package manager for kubernetes
- template engine for yaml files

---

### Quick install

- install `kubectl`
- install `helm`

---

### File structure

    wordpress/
      Chart.yaml          # A YAML file containing information about the chart
      LICENSE             # OPTIONAL: A plain text file containing the license for the chart
      README.md           # OPTIONAL: A human-readable README file
      values.yaml         # The default configuration values for this chart
      values.schema.json  # OPTIONAL: A JSON Schema for imposing a structure on the values.yaml file
      charts/             # A directory containing any charts upon which this chart depends.
      crds/               # Custom Resource Definitions
      templates/          # A directory of templates that, when combined with values,
                          # will generate valid Kubernetes manifest files.
      templates/NOTES.txt # OPTIONAL: A plain text file containing short usage notes

---

*- demo `patienten-peer` helm -*

---

### Adjustments made

1. Create `build/helm/patienten-peer`
2. Added gitlab-ci-templates:`php-helm-deploy-template.yml`
3. Modified `.gitlab-ci.yml`

---

### Lessions learned

- `kubectl create secret -o yaml` in kubectl=~1.5
    - has been added later to kubectl
    - gcloud uses k8s 1.5
    - gcloud-helm image uses k8s
    - workaround has been created by providing the yaml via `stdin`
- `helm install --set-string=23`
    - required if the value look like a number
- `{{ if foo -}}`
    - often handy
    - easy to make mistakes

---

### Todo

- Include sentry into the helm image
    - Currently sentry is an after step
    - `sentry-cli` could be included into the image
- `kubectl create secret docker-registry` workaround
    - generated object is more complex
    - may be harder to setup/debug

---

### Usefull pages to lookup

- [Topics Charts](https://helm.sh/docs/topics/charts/)
- [Template build-in objects](https://helm.sh/docs/chart_template_guide/builtin_objects/)
- [Template control flow](https://helm.sh/docs/chart_template_guide/control_structures/)