Skip to content

Commit

Permalink
Fix reference to s3.aws in all templates, add liveness probe to worke…
Browse files Browse the repository at this point in the history
…r deployment and event-worker
  • Loading branch information
kabooboo committed Oct 9, 2024
1 parent f54cca0 commit 183cc03
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion templates/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ spec:
{{ end }}
- name: LAGO_AWS_S3_REGION
value: {{ if .Values.global.s3.enabled }}
{{ .Values.global.s3.aws.region | quote }}
{{ .Values.global.s3.region | quote }}
{{ else if .Values.minio.enabled }}
{{ default "us-east-1" .Values.minio.region | quote }}
{{ end }}
Expand Down
3 changes: 3 additions & 0 deletions templates/events-worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,8 @@ spec:
livenessProbe:
exec:
command: ["/bin/bash", "-l", "-c", "bundle exec sidekiqmon processes | grep $(hostname) || exit 1"]
periodSeconds: 60
timeoutSeconds: 30
failureThreshold: 5
restartPolicy: Always
serviceAccountName: {{ .Values.global.serviceAccountName | default (printf "%s-serviceaccount" .Release.Name) }}
8 changes: 4 additions & 4 deletions templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ data:

{{- if not .Values.global.existingSecret }}
{{ if .Values.global.s3.enabled }}
{{ if .Values.global.s3.aws.accessKeyId }}
awsS3AccessKeyId: {{ .Values.global.s3.aws.accessKeyId | b64enc }}
{{ if .Values.global.s3.accessKeyId }}
awsS3AccessKeyId: {{ .Values.global.s3.accessKeyId | b64enc }}
{{ end }}
{{ if .Values.global.s3.aws.secretAccessKey }}
awsS3SecretAccessKey: {{ .Values.global.s3.aws.secretAccessKey | b64enc }}
{{ if .Values.global.s3.secretAccessKey }}
awsS3SecretAccessKey: {{ .Values.global.s3.secretAccessKey | b64enc }}
{{ end }}
{{ if eq .Values.global.s3.provider "minio" }}
{{ if .Values.global.s3.minio.accessKeyId }}
Expand Down
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
15 changes: 9 additions & 6 deletions templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,28 +113,28 @@ spec:
{{ if .Values.global.s3.enabled }}
- name: LAGO_USE_AWS_S3
value: "true"
{{ if .Values.global.s3.aws.endpoint }}
{{ if .Values.global.s3.endpoint }}
- name: LAGO_AWS_S3_ENDPOINT
value: {{ .Values.global.s3.aws.endpoint | quote }}
value: {{ .Values.global.s3.endpoint | quote }}
{{ end }}
{{ if or .Values.global.s3.aws.accessKeyId .Values.global.existingSecret }}
{{ if or .Values.global.s3.accessKeyId .Values.global.existingSecret }}
- name: LAGO_AWS_S3_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: {{ include "secret-path" . }}
key: awsS3AccessKeyId
{{ end }}
{{ if or .Values.global.s3.aws.secretAccessKey .Values.global.existingSecret }}
{{ if or .Values.global.s3.secretAccessKey .Values.global.existingSecret }}
- name: LAGO_AWS_S3_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ include "secret-path" . }}
key: awsS3SecretAccessKey
{{ end }}
- name: LAGO_AWS_S3_BUCKET
value: {{ .Values.global.s3.aws.bucket | quote }}
value: {{ .Values.global.s3.bucket | quote }}
- name: LAGO_AWS_S3_REGION
value: {{ .Values.global.s3.aws.region | quote }}
value: {{ .Values.global.s3.region | quote }}
{{ end }}
{{ if .Values.global.smtp.enabled }}
- name: LAGO_FROM_EMAIL
Expand Down Expand Up @@ -166,6 +166,9 @@ spec:
livenessProbe:
exec:
command: ["/bin/bash", "-l", "-c", "bundle exec sidekiqmon processes | grep $(hostname) || exit 1"]
periodSeconds: 60
timeoutSeconds: 30
failureThreshold: 5
{{- with .Values.worker.resources }}
resources:
{{- toYaml . | nindent 12}}
Expand Down

0 comments on commit 183cc03

Please sign in to comment.