Skip to content

Commit

Permalink
feat: allow the setup of custom podLabels (#35)
Browse files Browse the repository at this point in the history
Signed-off-by: Davide Madrisan <[email protected]>
  • Loading branch information
madrisan authored Apr 4, 2024
1 parent 69db374 commit 327a244
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 19 deletions.
7 changes: 5 additions & 2 deletions templates/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ spec:
metadata:
labels:
io.lago.service: {{ .Release.Name }}-api
{{- range $key, $value := .Values.api.podLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
annotations:
{{ range $key, $value := .Values.api.podAnnotations }}
{{- range $key, $value := .Values.api.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{ end }}
{{- end }}
spec:
initContainers:
{{ if .Values.postgresql.enabled }}
Expand Down
7 changes: 5 additions & 2 deletions templates/clock-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ spec:
metadata:
labels:
io.lago.service: {{ .Release.Name }}-clock
{{- range $key, $value := .Values.clock.podLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
annotations:
{{ range $key, $value := .Values.clock.podAnnotations }}
{{- range $key, $value := .Values.clock.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{ end }}
{{- end }}
spec:
initContainers:
{{ if .Values.redis.enabled }}
Expand Down
7 changes: 5 additions & 2 deletions templates/events-worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ spec:
metadata:
labels:
io.lago.service: {{ .Release.Name }}-events-worker
{{- range $key, $value := .Values.eventsWorker.podLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
annotations:
{{ range $key, $value := .Values.eventsWorker.podAnnotations }}
{{- range $key, $value := .Values.eventsWorker.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{ end }}
{{- end }}
spec:
initContainers:
{{ if .Values.redis.enabled }}
Expand Down
7 changes: 5 additions & 2 deletions templates/front-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ spec:
metadata:
labels:
io.lago.service: {{ .Release.Name }}-front
{{- range $key, $value := .Values.front.podLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
annotations:
{{ range $key, $value := .Values.front.podAnnotations }}
{{- range $key, $value := .Values.front.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{ end }}
{{- end }}
spec:
containers:
- env:
Expand Down
7 changes: 7 additions & 0 deletions templates/migrate-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ spec:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
{{- range $key, $value := .Values.job.migrate.podLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
annotations:
{{- range $key, $value := .Values.job.migrate.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
restartPolicy: Never
initContainers:
Expand Down
7 changes: 5 additions & 2 deletions templates/pdf-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ spec:
metadata:
labels:
io.lago.service: {{ .Release.Name }}-pdf
{{- range $key, $value := .Values.pdf.podLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
annotations:
{{ range $key, $value := .Values.pdf.podAnnotations }}
{{- range $key, $value := .Values.pdf.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{ end }}
{{- end }}
spec:
containers:
- image: getlago/lago-gotenberg:7.8.2
Expand Down
7 changes: 5 additions & 2 deletions templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ spec:
metadata:
labels:
io.lago.service: {{ .Release.Name }}-worker
{{- range $key, $value := .Values.worker.podLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
annotations:
{{ range $key, $value := .Values.worker.podAnnotations }}
{{- range $key, $value := .Values.worker.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{ end }}
{{- end }}
spec:
initContainers:
{{ if .Values.redis.enabled }}
Expand Down
25 changes: 18 additions & 7 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ global:
#className:

#serviceAccountName:

# If kubectlVersion is not supplied it will be inferred using the version of the cluster that Lago is deployed on.
#kubectlVersion: 1.29

Expand All @@ -95,7 +95,8 @@ front:
resources:
memory: 512
cpu: "200m"
# podAnnotations:
podAnnotations: {}
podLabels: {}

api:
replicas: 1
Expand All @@ -114,7 +115,8 @@ api:
cpu: "1000m"
volumes:
storage: "10Gi"
# podAnnotations:
podAnnotations: {}
podLabels: {}

worker:
replicas: 1
Expand All @@ -126,7 +128,8 @@ worker:
resources:
memory: 1024
cpu: "1000m"
# podAnnotations:
podAnnotations: {}
podLabels: {}

eventsWorker:
replicas: 1
Expand All @@ -138,7 +141,8 @@ eventsWorker:
resources:
memory: 1024
cpu: "1000m"
# podAnnotations:
podAnnotations: {}
podLabels: {}

clock:
replicas: 1
Expand All @@ -149,7 +153,8 @@ clock:
resources:
memory: 256
cpu: "100m"
# podAnnotations:
podAnnotations: {}
podLabels: {}

pdf:
replicas: 1
Expand All @@ -158,4 +163,10 @@ pdf:
resources:
memory: 2048
cpu: "1000m"
# podAnnotations
podAnnotations: {}
podLabels: {}

job:
migrate:
podAnnotations: {}
podLabels: {}

0 comments on commit 327a244

Please sign in to comment.