From 87397e2754f4ce10540d0a9845a6eb5b309e9760 Mon Sep 17 00:00:00 2001 From: CI Bot Date: Fri, 26 Apr 2024 07:33:21 +0000 Subject: [PATCH 1/2] chore(deps): bump 'notifications' image to 'sha256:5932be0e7003fbfadca16b29353a9df3618c9d3144b7a177889e0c0a99e62260' --- charts/galoy/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/galoy/values.yaml b/charts/galoy/values.yaml index 65841062d7..790590972b 100644 --- a/charts/galoy/values.yaml +++ b/charts/galoy/values.yaml @@ -75,7 +75,7 @@ galoy: repository: us.gcr.io/galoy-org/galoy-notifications ## Digest of the image ## - digest: "sha256:0dfab4a610b9bb52a93844fb34998fabdcc98db52de0c0eb819766844dc36cdb" # METADATA:: repository=https://github.com/GaloyMoney/galoy;commit_ref=8dcce4d;app=notifications;monorepo_subdir=core/notifications; + digest: "sha256:5932be0e7003fbfadca16b29353a9df3618c9d3144b7a177889e0c0a99e62260" # METADATA:: repository=https://github.com/GaloyMoney/galoy;commit_ref=8a2305f;app=notifications;monorepo_subdir=core/notifications; ## Galoy Application MongoDB Migration Image details ## mongodbMigrate: From cf0a6ffebcee5f3e20a051168e7f3fa2f31e8780 Mon Sep 17 00:00:00 2001 From: bodymindarts Date: Fri, 26 Apr 2024 09:34:20 +0200 Subject: [PATCH 2/2] chore: add notifications-jobs --- .../notification-jobs-deployment.yaml | 72 +++++++++++++++++++ charts/galoy/templates/notifications-cm.yaml | 2 +- .../templates/notifications-jobs-cm.yaml | 26 +++++++ charts/galoy/values.yaml | 2 + 4 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 charts/galoy/templates/notification-jobs-deployment.yaml create mode 100644 charts/galoy/templates/notifications-jobs-cm.yaml diff --git a/charts/galoy/templates/notification-jobs-deployment.yaml b/charts/galoy/templates/notification-jobs-deployment.yaml new file mode 100644 index 0000000000..c1fd184484 --- /dev/null +++ b/charts/galoy/templates/notification-jobs-deployment.yaml @@ -0,0 +1,72 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "galoy.notifications.fullname" . }}-jobs + labels: + app: {{ template "galoy.notifications.fullname" . }}-jobs + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + app.kubernetes.io/managed-by: Helm + kube-monkey/enabled: enabled + kube-monkey/identifier: {{ template "galoy.notifications.fullname" . }}-jobs + kube-monkey/kill-mode: fixed + kube-monkey/kill-value: "1" + kube-monkey/mtbf: "3" +spec: + replicas: {{ .Values.galoy.notifications.jobs_replicas }} + selector: + matchLabels: + app: {{ template "galoy.notifications.fullname" . }}-jobs + template: + metadata: + name: {{ template "galoy.notifications.fullname" . }}-jobs + labels: + app: {{ template "galoy.notifications.fullname" . }}-jobs + kube-monkey/enabled: enabled + kube-monkey/identifier: {{ template "galoy.notifications.fullname" . }} + annotations: + checksum/config: {{ include (print $.Template.BasePath "/notifications-jobs-cm.yaml") . | sha256sum }} + spec: + containers: + - name: notifications + image: "{{ .Values.galoy.images.notifications.repository }}@{{ .Values.galoy.images.notifications.digest }}" + resources: + {{ toYaml .Values.galoy.notifications.jobsResources | nindent 10 }} + env: + - name: PG_CON + valueFrom: + secretKeyRef: + name: {{ template "galoy.notifications.fullname" . }} + key: pg-con + - name: PG_READ_CON + valueFrom: + secretKeyRef: + name: {{ template "galoy.notifications.fullname" . }} + key: pg-read-con + - name: EMAIL_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "galoy.notifications.fullname" . }} + key: smtp-password + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: {{ .Values.tracing.otelExporterGrpcEndpoint | quote }} + - name: NOTIFICATIONS_CONFIG + value: "/notifications.yml" + volumeMounts: + - name: config + mountPath: "/notifications.yml" + subPath: "notifications.yml" + readOnly: true + - name: firebase-notifications-service-account + mountPath: /tmp/firebase-service-account/ + readOnly: true + volumes: + - name: config + configMap: + name: {{ template "galoy.notifications.fullname" . }}-jobs + - name: firebase-notifications-service-account + secret: + secretName: {{ template "galoy.notifications.fullname" . }} + items: + - key: firebase-service-account + path: service-account.json diff --git a/charts/galoy/templates/notifications-cm.yaml b/charts/galoy/templates/notifications-cm.yaml index fdd586875f..4e68c836a5 100644 --- a/charts/galoy/templates/notifications-cm.yaml +++ b/charts/galoy/templates/notifications-cm.yaml @@ -29,7 +29,7 @@ data: relay: {{ .Values.galoy.notifications.config.smtp.relayHost }} port: {{ .Values.galoy.notifications.config.smtp.relayPort }} jobs: - kickoff_link_email_reminder_delay: {{ .Values.galoy.notifications.config.jobs.kickoffLinkEmailReminderDelay }} + enabled: false link_email_reminder: account_liveness_threshold_minutes: {{ .Values.galoy.notifications.config.linkEmailReminder.accountLivenessThresholdMinutes }} account_age_threshold_minutes: {{ .Values.galoy.notifications.config.linkEmailReminder.accountAgeThresholdMinutes }} diff --git a/charts/galoy/templates/notifications-jobs-cm.yaml b/charts/galoy/templates/notifications-jobs-cm.yaml new file mode 100644 index 0000000000..4a434c4232 --- /dev/null +++ b/charts/galoy/templates/notifications-jobs-cm.yaml @@ -0,0 +1,26 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "galoy.notifications.fullname" . }}-jobs +data: + notifications.yml: |- + db: + pool_size: {{ .Values.galoy.notifications.config.db.poolSize }} + tracing: + endpoint: {{ .Values.tracing.otelExporterOtlpEndpoint }} + service_name: "{{ .Values.tracing.prefix }}-{{ template "galoy.notifications.fullname" . }}-jobs" + app: + push_executor: + fcm: + google_application_credentials_path: "/tmp/firebase-service-account/service-account.json" + email_executor: + enabled: {{ .Values.galoy.notifications.config.smtp.enabled }} + smtp: + username: {{ .Values.galoy.notifications.config.smtp.username }} + from_email: {{ .Values.galoy.notifications.config.smtp.fromEmail }} + from_name: {{ .Values.galoy.notifications.config.smtp.fromName }} + relay: {{ .Values.galoy.notifications.config.smtp.relayHost }} + port: {{ .Values.galoy.notifications.config.smtp.relayPort }} + jobs: + enabled: true + kickoff_link_email_reminder_delay: {{ .Values.galoy.notifications.config.jobs.kickoffLinkEmailReminderDelay }} diff --git a/charts/galoy/values.yaml b/charts/galoy/values.yaml index 790590972b..30df88aa4f 100644 --- a/charts/galoy/values.yaml +++ b/charts/galoy/values.yaml @@ -420,8 +420,10 @@ galoy: notifications: nameOverride: replicas: 2 + jobs_replicas: 2 serviceType: ClusterIP resources: {} + jobsResources: {} grpcPort: 6685 graphqlPort: 6684 config: