# Glossary — Helm

The canonical vocabulary for this course. Opinionated and repo-flavoured. Once a term is
defined here, every lesson uses it this way. Terms marked *(Part N)* are taught in that part.

---

### Helm
The package manager for Kubernetes: it templates, packages, installs, and upgrades sets of K8s
objects as versioned units. Pinned here to **v3.14.4**. Helm 3 is client-only (no Tiller).

### Chart
A Helm package — a directory of templates + default values + metadata (`Chart.yaml`) that
renders to a set of Kubernetes manifests. *Repo: ~106 charts under `deployments/helm/`; one
`application` chart per backend service.*

### Chart.yaml
The chart's metadata: `apiVersion` (v2 for Helm 3), `name`, `version` (the chart's own version),
`appVersion` (the app it deploys), `type` (`application` or `library`), and optional
`dependencies`. *Repo: service charts are `type: application, version: 0.1.0`, no deps.*

### Release
A specific *installed instance* of a chart in a cluster, with a name and a revision history.
Installing the same chart twice = two releases. *Repo: Skaffold defines a release per service,
e.g. `bob` in namespace `local-manabie-backend`.*

### Values
The configuration inputs to a chart's templates, read as `.Values`. Come from the chart's
`values.yaml` defaults, overridden by user-supplied `-f` files and `--set` flags. *Repo: layered
`{env}-{org}-values.yaml`.*

### values.yaml
The chart's default values file. *Repo: a per-service `values.yaml` + a shared
`backend/values.yaml` holding only a `global:` block.*

### Template
A file in `templates/` run through Go's template engine to produce a K8s manifest. Uses
`{{ }}` actions, `.Values`/`.Release`/`.Chart` objects, functions and pipelines. *(Lesson 3)*

### Built-in objects *(Lesson 3)*
Top-level objects Helm injects: **`.Values`** (config), **`.Release`** (`.Name`, `.Namespace`,
`.IsUpgrade`…), **`.Chart`** (Chart.yaml fields), **`.Capabilities`** (cluster/API versions,
e.g. `.APIVersions.Has "keda.sh/v1alpha1"`), **`.Files`** (chart files), **`.Template`**.

### Pipeline / function *(Lesson 3)*
`{{ .Values.x | default "y" | quote }}` — pass a value through functions left-to-right. Helm
ships Go template + **Sprig** funcs. *Repo favourites: `default`, `toYaml`, `nindent`, `tpl`,
`fromYaml`, `mustMergeOverwrite`, `fail`.*

### `include` vs `template` *(Lessons 3, 5)*
Both render a named template; **`include` returns a string you can pipe** (e.g.
`| nindent 4`), `template` is an action that can't be piped. Prefer `include`. *Repo: uses
`include` everywhere.*

### `tpl` *(Lessons 3, 9)*
A function that renders a *string* as a template against a context — used to template values or
config files. *Repo: `_configmap.tpl:22` renders a config file with `tpl`.*

### Named template / partial *(Lesson 5)*
A reusable template block created with `{{ define "name" }}…{{ end }}`, invoked with `include`.
Convention: prefix with the chart name to avoid clashes. *Repo: all `util.*`, e.g.
`util.fullname`, `util.labels`, `util.deployment`.*

### `_helpers.tpl` *(Lesson 5)*
The conventional file for partials (underscore = not rendered to a manifest). *Repo: none —
helpers are split across `_name.tpl`, `_label.tpl`, `_env.tpl`, `_check.tpl`.*

### fullname / labels pattern *(Lesson 5)*
The standard helpers that name objects consistently and stamp the recommended
`app.kubernetes.io/*` labels — the glue that makes a Deployment, its Pods, and its Service
selector agree. *Repo: `util.fullname` (`_name.tpl:14`), `util.labels`/`util.selectorLabels`
(`_label.tpl`).*

### Library chart *(Lesson 6)*
A chart with `type: library` that defines *only* named templates — it renders nothing on its
own and is meant to be shared by other charts. *Repo: `libs/util` is exactly this.*

### Subchart / dependency *(Lesson 6)*
A chart nested inside another (declared in `dependencies:`, fetched to `charts/`). A parent can
override a subchart's values; a subchart can't read the parent's (except `global`). *Repo: rare
— only `zeus` (sftpgo) and platform charts; util is copied, not a dependency.*

### `update_deps.sh` (the copy mechanism) *(Lesson 6)*
This repo's non-standard distribution: instead of a `dependencies:` block, a script **copies**
`libs/util/templates/` into every chart's `templates/util/`. *Repo:
`deployments/helm/update_deps.sh`.*

### Global values *(Lessons 4, 10)*
The `.Values.global` section — the one place values are shared across a chart and all its
subcharts. *Repo: `backend/values.yaml` is all `global:`; feeds `global.environment`/`.vendor`.*

### Values precedence *(Lesson 4)*
Lowest → highest: subchart `values.yaml` → parent `values.yaml` → `-f` files (last wins) →
`--set` (wins all). *Repo: Skaffold's `valuesFiles` order encodes the `-f` layering.*

### Hook *(Lesson 7)*
A chart resource annotated `helm.sh/hook` to run at a lifecycle point (`pre-install`,
`post-upgrade`, …), ordered by `hook-weight`, cleaned by `hook-delete-policy`. *Repo: the
`<svc>-migrate` Job (`pre-install,pre-upgrade`, weight `-47`) — gated to **local** only.*

### `helm template` / `render` *(Lessons 3, 8)*
Render a chart to manifests locally without installing. *Repo: this is what `skaffold render`
does (Course 1 L7).*

### `helm upgrade --install` *(Lesson 8, 11)*
Install a release, or upgrade it in place if it exists — the idempotent deploy. *Repo: what
`skaffold run` invokes.*

### Rollback / history / revision *(Lesson 11)*
Each `install`/`upgrade` creates a numbered **revision**; `helm history` lists them and
`helm rollback` reverts to one. `--atomic` auto-rolls-back a failed upgrade.

### SOPS / `.AsSecrets` *(Lesson 9)*
SOPS = Secrets OPerationS, encrypts values files (KMS/PGP-backed). `.AsSecrets` is a Helm
built-in (`.Files.Glob`) that base64-packs matching files into a Secret. *Repo: encrypted files
are shipped into a Secret and decrypted **in-app** — NOT decrypted at deploy time.*

### `.helmignore` *(Lesson 12)*
Like `.gitignore`, but for `helm package` — excludes files from the chart. *Repo: present in
every chart.*

### `helm lint` / `values.schema.json` *(Lesson 12)*
Static chart validation. *Repo: no `helm lint` in CI; only one `values.schema.json` (appsmith).
The real guard is a `helm template` render + the generated-`templates/util/` drift check.*
