Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

start on docs update for labels #7696

Closed
wants to merge 4 commits into from
Closed
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
21 changes: 20 additions & 1 deletion REVIEW_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,26 @@ Stable charts should not depend on charts in incubator.

## Names and Labels

Resources and labels should follow some conventions. The standard resource metadata should be this:
Resources and labels should follow some conventions.

**NOTE:**
*The guidelines for standard labels [have changed](https://github.com/helm/helm/issues/4335). However, since labels are immutable when using apps/v1, and the legacy labels still function, updating a chart from legacy to new labels would be an unnecessary breaking change. Therefore, charts with legacy labels should continue to use them until another breaking change pull request presents an opportunity to also update to the new label style in one MAJOR version bump.*

Updated labels, [full list with comments can be found in the best practices guide](https://github.com/helm/helm/blob/master/docs/chart_best_practices/labels.md)

```yaml
name: {{ template "myapp.fullname" . }}
labels:
app.kubernetes.io/name: {{ template "name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} <-- this is mutable!
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }} <-- this is mutable!!
app.kubernetes.io/component: [see best practices guide](https://github.com/helm/helm/blob/master/docs/chart_best_practices/labels.md)
app.kubernetes.io/part-of: [see best practices guide](https://github.com/helm/helm/blob/master/docs/chart_best_practices/labels.md)
```

Legacy labels:

```yaml
name: {{ template "myapp.fullname" . }}
Expand Down