Skip to content

Commit

Permalink
implement helm best practices. add recommended standard helm labels. …
Browse files Browse the repository at this point in the history
…move crds from templates/ to crds/
  • Loading branch information
snooyen committed Aug 7, 2020
1 parent ac02684 commit ff88924
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ Standard labels for helm resources
*/}}
{{- define "sscd.labels" -}}
labels:
heritage: "{{ .Release.Service }}"
release: "{{ .Release.Name }}"
revision: "{{ .Release.Revision }}"
chart: "{{ .Chart.Name }}"
chartVersion: "{{ .Chart.Version }}"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
app.kubernetes.io/name: "{{ template "sscd.name" . }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
app: {{ template "sscd.name" . }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Helm 3 stores CRDS in chart/crds directory.
# This purpose of this template is of maintain
# compatibility with previous chart versions and Helm v2 users.

{{- range $path, $bytes := .Files.Glob "crds/*.yaml" }}
{{ $.Files.Get $path }}
---
{{- end }}

0 comments on commit ff88924

Please sign in to comment.