Skip to content

Commit

Permalink
feat: improve selector labels (#64)
Browse files Browse the repository at this point in the history

---------

Co-authored-by: owlas <owlas@users.noreply.github.com>
  • Loading branch information
owlas and owlas authored Jun 4, 2024
1 parent d106963 commit d3b6307
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
4 changes: 2 additions & 2 deletions charts/lightdash/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.8.9
version: 0.9.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: 0.702.0
appVersion: 0.1121.0

maintainers:
- name: owlas
Expand Down
2 changes: 1 addition & 1 deletion charts/lightdash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A Helm chart to deploy lightdash on kubernetes

![Version: 0.8.8](https://img.shields.io/badge/Version-0.8.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.686.0](https://img.shields.io/badge/AppVersion-0.686.0-informational?style=flat-square)
![Version: 0.9.0](https://img.shields.io/badge/Version-0.9.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1121.0](https://img.shields.io/badge/AppVersion-0.1121.0-informational?style=flat-square)

## Prerequisites

Expand Down
9 changes: 9 additions & 0 deletions charts/lightdash/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ Selector labels
app.kubernetes.io/name: {{ include "lightdash.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{- define "lightdash.backendSelectorLabels" -}}
{{ include "lightdash.selectorLabels" . }}
app.kubernetes.io/component: backend
{{- end }}
{{- define "lightdash.schedulerSelectorLabels" -}}
{{ include "lightdash.selectorLabels" . }}
app.kubernetes.io/component: worker
{{- end }}



{{/*
Expand Down
4 changes: 2 additions & 2 deletions charts/lightdash/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ spec:
{{- end }}
selector:
matchLabels:
{{- include "lightdash.selectorLabels" . | nindent 6 }}
{{- include "lightdash.backendSelectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "lightdash.selectorLabels" . | nindent 8 }}
{{- include "lightdash.backendSelectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
4 changes: 2 additions & 2 deletions charts/lightdash/templates/scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ spec:
replicas: {{ .Values.scheduler.replicas }}
selector:
matchLabels:
{{- include "lightdash.selectorLabels" . | nindent 6 }}
{{- include "lightdash.schedulerSelectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "lightdash.selectorLabels" . | nindent 8 }}
{{- include "lightdash.schedulerSelectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
2 changes: 1 addition & 1 deletion charts/lightdash/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ spec:
protocol: TCP
name: http
selector:
{{- include "lightdash.selectorLabels" . | nindent 6 }}
{{- include "lightdash.backendSelectorLabels" . | nindent 6 }}

0 comments on commit d3b6307

Please sign in to comment.