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

feat(helm): add support for extraEnv variables in api, front, worker, events-worker, clock, and pdf deployments for dynamic environment configuration #74

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions templates/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ spec:
value: {{ .Values.api.rails.webConcurrency | quote }}
- name: LAGO_LOG_LEVEL
value: {{ .Values.api.rails.logLevel | quote }}
{{- with .Values.api.extraEnv }}
{{- range $key, $value := . }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{ if .Values.global.license }}
- name: LAGO_LICENSE
valueFrom:
Expand Down Expand Up @@ -245,13 +251,13 @@ spec:
resources:
{{- toYaml . | nindent 12}}
{{- end }}
{{ if not .Values.global.s3.enabled }}
{{- if and (not .Values.global.s3.enabled) (not .Values.minio.enabled) -}}
volumeMounts:
- mountPath: /app/storage
name: {{ .Release.Name }}-storage-data
{{ end }}
restartPolicy: Always
{{ if not .Values.global.s3.enabled }}
{{- if and (not .Values.global.s3.enabled) (not .Values.minio.enabled) -}}
volumes:
- name: {{ .Release.Name }}-storage-data
persistentVolumeClaim:
Expand Down
6 changes: 6 additions & 0 deletions templates/clock-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ spec:
key: redisUrl
- name: RAILS_LOG_TO_STDOUT
value: {{ .Values.clock.rails.logStdout | quote }}
{{- with .Values.clock.extraEnv }}
{{- range $key, $value := . }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
- name: LAGO_RSA_PRIVATE_KEY
valueFrom:
secretKeyRef:
Expand Down
6 changes: 6 additions & 0 deletions templates/events-worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ spec:
key: redisUrl
- name: RAILS_LOG_TO_STDOUT
value: {{ .Values.eventsWorker.rails.logStdout | quote }}
{{- with .Values.eventsWorker.extraEnv }}
{{- range $key, $value := . }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
- name: LAGO_RSA_PRIVATE_KEY
valueFrom:
secretKeyRef:
Expand Down
6 changes: 6 additions & 0 deletions templates/front-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ spec:
value: {{ .Values.apiUrl | quote }}
- name: LAGO_DISABLE_SIGNUP
value: {{ not .Values.global.signup.enabled | quote }}
{{- with .Values.front.extraEnv }}
nudded marked this conversation as resolved.
Show resolved Hide resolved
{{- range $key, $value := . }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
image: getlago/front:v{{ .Values.version }}
name: {{ .Release.Name }}-front
ports:
Expand Down
7 changes: 7 additions & 0 deletions templates/pdf-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,11 @@ spec:
resources:
{{- toYaml . | nindent 12}}
{{- end }}
env:
{{- with .Values.pdf.extraEnv }}
{{- range $key, $value := . }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
restartPolicy: Always
2 changes: 1 addition & 1 deletion templates/storage-data-persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if not .Values.global.s3.enabled and not .Values.minio.enabled -}}
{{- if and (not .Values.global.s3.enabled) (not .Values.minio.enabled) -}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand Down
6 changes: 6 additions & 0 deletions templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ spec:
value: {{ required "frontUrl value is required" .Values.frontUrl | quote }}
- name: RAILS_LOG_TO_STDOUT
value: {{ .Values.worker.rails.logStdout | quote }}
{{- with .Values.worker.extraEnv }}
{{- range $key, $value := . }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
- name: LAGO_RSA_PRIVATE_KEY
valueFrom:
secretKeyRef:
Expand Down
10 changes: 10 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ front:
cpu: '200m'
podAnnotations: {}
podLabels: {}
extraEnv: {}


api:
replicas: 1
Expand All @@ -123,6 +125,7 @@ api:
volumes:
accessModes: ReadWriteOnce
storage: '10Gi'
extraEnv: {}
podAnnotations: {}
podLabels: {}

Expand All @@ -139,6 +142,7 @@ worker:
cpu: '1000m'
podAnnotations: {}
podLabels: {}
extraEnv: {}

eventsWorker:
replicas: 1
Expand All @@ -153,6 +157,8 @@ eventsWorker:
cpu: '1000m'
podAnnotations: {}
podLabels: {}
extraEnv: {}


clock:
replicas: 1
Expand All @@ -166,6 +172,8 @@ clock:
cpu: '100m'
podAnnotations: {}
podLabels: {}
extraEnv: {}


pdf:
replicas: 1
Expand All @@ -177,6 +185,8 @@ pdf:
cpu: '1000m'
podAnnotations: {}
podLabels: {}
extraEnv: {}


job:
migrate:
Expand Down
Loading