Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring Kubernetes recommanded labels #78

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion charts/quickwit/Chart.yaml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ apiVersion: v2
name: quickwit
description: Sub-second search & analytics engine on cloud storage.
type: application
version: 0.7.7
version: 0.8.0
appVersion: "v0.8.2"
keywords:
- quickwit
1 change: 0 additions & 1 deletion charts/quickwit/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -44,7 +44,6 @@ Common labels
*/}}
{{- define "quickwit.labels" -}}
helm.sh/chart: {{ include "quickwit.chart" . }}
{{ include "quickwit.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/quickwit/templates/configmap-bootstrap.yaml
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@ metadata:
name: {{ include "quickwit.fullname" . }}-bootstrap
labels:
{{- include "quickwit.labels" . | nindent 4 }}
{{- include "quickwit.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: config
data:
{{- range .Values.seed.indexes }}
{{ .index_id }}.yaml: |-
2 changes: 2 additions & 0 deletions charts/quickwit/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -4,6 +4,8 @@ metadata:
name: {{ include "quickwit.fullname" . }}
labels:
{{- include "quickwit.labels" . | nindent 4 }}
{{- include "quickwit.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: config
data:
node.yaml: |-
{{- toYaml .Values.config | nindent 4 }}
3 changes: 2 additions & 1 deletion charts/quickwit/templates/control-plane-deployment.yaml
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ metadata:
name: {{ include "quickwit.fullname" . }}-control-plane
labels:
{{- include "quickwit.labels" . | nindent 4 }}
{{- include "quickwit.control_plane.selectorLabels" . | nindent 4 }}
annotations:
{{- with .Values.annotations }}
{{- toYaml . | nindent 4 }}
@@ -29,7 +30,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "quickwit.additionalLabels" . | nindent 8 }}
{{- include "quickwit.labels" . | nindent 8 }}
{{- include "quickwit.control_plane.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
2 changes: 2 additions & 0 deletions charts/quickwit/templates/prometheusrule.yaml
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@ metadata:
name: {{ include "quickwit.fullname" . }}
labels:
{{- include "quickwit.labels" . | nindent 4 }}
{{- include "quickwit.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: metrics
{{- with .Values.prometheusRule.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
7 changes: 6 additions & 1 deletion charts/quickwit/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ metadata:
name: {{ include "quickwit.fullname" . }}-searcher
labels:
{{- include "quickwit.labels" . | nindent 4 }}
{{- include "quickwit.searcher.selectorLabels" . | nindent 4 }}
annotations:
{{- with .Values.service.annotations }}
{{- toYaml . | nindent 4 }}
@@ -36,6 +37,7 @@ metadata:
name: {{ include "quickwit.fullname" . }}-headless
labels:
{{- include "quickwit.labels" . | nindent 4 }}
{{- include "quickwit.selectorLabels" . | nindent 4 }}
annotations:
{{- with .Values.service.annotations }}
{{- toYaml . | nindent 4 }}
@@ -72,6 +74,7 @@ metadata:
name: {{ include "quickwit.fullname" . }}-indexer
labels:
{{- include "quickwit.labels" . | nindent 4 }}
{{- include "quickwit.indexer.selectorLabels" . | nindent 4 }}
annotations:
{{- with .Values.service.annotations }}
{{- toYaml . | nindent 4 }}
@@ -104,6 +107,7 @@ metadata:
name: {{ include "quickwit.fullname" . }}-metastore
labels:
{{- include "quickwit.labels" . | nindent 4 }}
{{- include "quickwit.metastore.selectorLabels" . | nindent 4 }}
annotations:
{{- with .Values.service.annotations }}
{{- toYaml . | nindent 4 }}
@@ -136,6 +140,7 @@ metadata:
name: {{ include "quickwit.fullname" . }}-control-plane
labels:
{{- include "quickwit.labels" . | nindent 4 }}
{{- include "quickwit.control_plane.selectorLabels" . | nindent 4 }}
annotations:
{{- with .Values.service.annotations }}
{{- toYaml . | nindent 4 }}
@@ -161,14 +166,14 @@ spec:
name: grpc
selector:
{{- include "quickwit.control_plane.selectorLabels" . | nindent 4 }}

---
apiVersion: v1
kind: Service
metadata:
name: {{ include "quickwit.fullname" . }}-janitor
labels:
{{- include "quickwit.labels" . | nindent 4 }}
{{- include "quickwit.janitor.selectorLabels" . | nindent 4 }}
annotations:
{{- with .Values.service.annotations }}
{{- toYaml . | nindent 4 }}
2 changes: 2 additions & 0 deletions charts/quickwit/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@ metadata:
name: {{ include "quickwit.serviceAccountName" . }}
labels:
{{- include "quickwit.labels" . | nindent 4 }}
{{- include "quickwit.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: rbac
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
2 changes: 2 additions & 0 deletions charts/quickwit/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@ metadata:
name: {{ include "quickwit.fullname" . }}
labels:
{{- include "quickwit.labels" . | nindent 4 }}
{{- include "quickwit.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: metrics
{{- with .Values.serviceMonitor.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}