Skip to content

Commit 9cb92d6

Browse files
bors[bot]allangaleraalallema
authored
Merge #80
80: Add custom labels r=alallema a=allangalera Added a `customLabel` attribute to `values.yaml` so that the user can costumize labels. This attribute is replicated on all templates `metadata.labels`. Co-authored-by: Allan Galera <[email protected]> Co-authored-by: Amélie <[email protected]>
2 parents e95c3d5 + 0e042e1 commit 9cb92d6

File tree

9 files changed

+28
-2
lines changed

9 files changed

+28
-2
lines changed

charts/meilisearch/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
appVersion: "v0.22.0"
33
description: A Helm chart for the Meilisearch search engine
44
name: meilisearch
5-
version: 0.1.16
5+
version: 0.1.17
66
icon: https://res.cloudinary.com/meilisearch/image/upload/v1597822872/Logo/logo_img.svg
77
home: https://github.com/meilisearch/meilisearch-kubernetes/charts
88
maintainers:

charts/meilisearch/templates/configmap.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ metadata:
77
helm.sh/chart: {{ include "meilisearch.chart" . }}
88
app.kubernetes.io/instance: {{ .Release.Name }}
99
app.kubernetes.io/managed-by: {{ .Release.Service }}
10+
{{- with .Values.customLabels }}
11+
{{- toYaml . | nindent 4 }}
12+
{{- end }}
1013
data:
1114
{{- range $key, $value := .Values.environment }}
1215
{{ $key }}: {{ $value | quote}}

charts/meilisearch/templates/ingress.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ metadata:
1010
helm.sh/chart: {{ include "meilisearch.chart" . }}
1111
app.kubernetes.io/instance: {{ .Release.Name }}
1212
app.kubernetes.io/managed-by: {{ .Release.Service }}
13+
{{- with .Values.customLabels }}
14+
{{- toYaml . | nindent 4 }}
15+
{{- end }}
1316
{{- with .Values.ingress.annotations }}
1417
annotations:
1518
{{ toYaml . | indent 4 }}

charts/meilisearch/templates/master-key-secret.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ metadata:
1010
helm.sh/chart: {{ include "meilisearch.chart" . }}
1111
app.kubernetes.io/instance: {{ .Release.Name }}
1212
app.kubernetes.io/managed-by: {{ .Release.Service }}
13+
{{- with .Values.customLabels }}
14+
{{- toYaml . | nindent 4 }}
15+
{{- end }}
1316
data:
1417
{{- if $secret }}
1518
MEILI_MASTER_KEY: {{ $secret.data.MEILI_MASTER_KEY }}
1619
{{ else }}
1720
MEILI_MASTER_KEY: {{ randAlphaNum 20 | b64enc }}
1821
{{- end }}
19-
{{ end }}
22+
{{ end }}

charts/meilisearch/templates/pvc.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ metadata:
88
helm.sh/chart: {{ include "meilisearch.chart" . }}
99
app.kubernetes.io/instance: {{ .Release.Name }}
1010
app.kubernetes.io/managed-by: {{ .Release.Service }}
11+
{{- with .Values.customLabels }}
12+
{{- toYaml . | nindent 4 }}
13+
{{- end }}
1114
spec:
1215
accessModes:
1316
- {{ .Values.persistence.accessMode | quote }}

charts/meilisearch/templates/service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ metadata:
77
helm.sh/chart: {{ include "meilisearch.chart" . }}
88
app.kubernetes.io/instance: {{ .Release.Name }}
99
app.kubernetes.io/managed-by: {{ .Release.Service }}
10+
{{- with .Values.customLabels }}
11+
{{- toYaml . | nindent 4 }}
12+
{{- end }}
1013
spec:
1114
type: {{ .Values.service.type }}
1215
ports:

charts/meilisearch/templates/serviceaccount.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ metadata:
77
helm.sh/chart: {{ include "meilisearch.chart" . }}
88
app.kubernetes.io/instance: {{ .Release.Name }}
99
app.kubernetes.io/managed-by: {{ .Release.Service }}
10+
{{- with .Values.customLabels }}
11+
{{- toYaml . | nindent 4 }}
12+
{{- end }}

charts/meilisearch/templates/statefulset.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ metadata:
77
helm.sh/chart: {{ include "meilisearch.chart" . }}
88
app.kubernetes.io/instance: {{ .Release.Name }}
99
app.kubernetes.io/managed-by: {{ .Release.Service }}
10+
{{- with .Values.customLabels }}
11+
{{- toYaml . | nindent 4 }}
12+
{{- end }}
1013
spec:
1114
replicas: {{ .Values.replicaCount }}
1215
serviceName: {{ template "meilisearch.fullname" . }}
@@ -19,6 +22,9 @@ spec:
1922
labels:
2023
app.kubernetes.io/name: {{ include "meilisearch.name" . }}
2124
app.kubernetes.io/instance: {{ .Release.Name }}
25+
{{- with .Values.customLabels }}
26+
{{- toYaml . | nindent 8 }}
27+
{{- end }}
2228
{{- with .Values.podAnnotations }}
2329
annotations:
2430
{{- toYaml . | nindent 8 }}

charts/meilisearch/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ environment:
3232

3333
podAnnotations: {}
3434

35+
customLabels: {}
36+
3537
service:
3638
type: ClusterIP
3739
port: 7700

0 commit comments

Comments
 (0)