Very simple k8s customer pattern, only creates namespaces for now.
Showing
5 changed files
with
69 additions
and
0 deletions
chart/brainfood-customer/Chart.yaml
0 → 100644
1 | {{- define "BrainfoodCustomer.name" -}} | ||
2 | {{- default .Chart.Name .Values.nameOverride | trunc 48 | trimSuffix "-" }} | ||
3 | {{- end }} | ||
4 | |||
5 | {{- define "BrainfoodCustomer.fullname" -}} | ||
6 | {{- if .Values.fullnameOverride }} | ||
7 | {{- .Values.fullnameOverride | trunc 48 | trimSuffix "-" }} | ||
8 | {{- else }} | ||
9 | {{- $name := default .Chart.Name .Values.nameOverride }} | ||
10 | {{- if contains $name .Release.Name }} | ||
11 | {{- .Release.Name | trunc 48 | trimSuffix "-" }} | ||
12 | {{- else }} | ||
13 | {{- printf "%s-%s" .Release.Name $name | trunc 48 | trimSuffix "-" }} | ||
14 | {{- end }} | ||
15 | {{- end }} | ||
16 | {{- end }} | ||
17 | |||
18 | {{- define "BrainfoodCustomer.chart" -}} | ||
19 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
20 | {{- end }} | ||
21 | |||
22 | {{- define "BrainfoodCustomer.chartLabels" -}} | ||
23 | helm.sh/chart: {{ include "BrainfoodCustomer.chart" . }} | ||
24 | {{- if .Chart.AppVersion }} | ||
25 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
26 | {{- end }} | ||
27 | app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
28 | {{- end }} | ||
29 | |||
30 | {{- define "BrainfoodCustomer.labels" -}} | ||
31 | {{ include "BrainfoodCustomer.chartLabels" (index . 0) }} | ||
32 | {{ include "BrainfoodCustomer.selectorLabels" . }} | ||
33 | {{- end }} | ||
34 | |||
35 | {{- define "BrainfoodCustomer.selectorLabels" -}} | ||
36 | app.kubernetes.io/name: {{ include "BrainfoodCustomer.name" (index . 0) }} | ||
37 | app.kubernetes.io/instance: {{ (index . 0).Release.Name }} | ||
38 | app.kubernetes.io/pod: {{ (index . 1) }} | ||
39 | {{- end }} | ||
40 |
chart/brainfood-customer/values.yaml
0 → 100644
-
Please register or sign in to post a comment