Skip to content

Commit

Permalink
feat: add bria config to galoy chart
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymindarts committed Jun 1, 2023
1 parent 39fbe9c commit d19ead9
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 0 deletions.
12 changes: 12 additions & 0 deletions charts/galoy/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,18 @@ Return Galoy environment variables for LND 2 configuration
{{ end }}
{{- end -}}

{{- define "galoy.bria.env" -}}
- name: BRIA_HOST
value: {{ .Values.galoy.bria.host | quote }}
- name: BRIA_PORT
value: {{ .Values.galoy.bria.port | quote }}
- name: BRIA_PROFILE_API_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.bria.apiKeyExistingSecret.name | quote }}
key: {{ .Values.bria.apiKeyExistingSecret.key | quote }}
{{- end -}}

{{/*
Return Galoy environment variables for Redis configuration
*/}}
Expand Down
1 change: 1 addition & 0 deletions charts/galoy/templates/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ spec:
{{ include "galoy.bitcoind.env" . | indent 8 }}
{{ include "galoy.lnd1.env" . | indent 8 }}
{{ include "galoy.lnd2.env" . | indent 8 }}
{{ include "galoy.bria.env" . | indent 8 }}

{{/* API Specifics */}}
{{ include "galoy.twilio.env" . | indent 8 }}
Expand Down
1 change: 1 addition & 0 deletions charts/galoy/templates/galoy-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ spec:
{{ include "galoy.bitcoind.env" . | indent 12 }}
{{ include "galoy.lnd1.env" . | indent 12 }}
{{ include "galoy.lnd2.env" . | indent 12 }}
{{ include "galoy.bria.env" . | indent 8 }}

{{ include "galoy.jwt.env" . | indent 12 }}

Expand Down
14 changes: 14 additions & 0 deletions charts/galoy/templates/galoy-secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ data:

---

apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.galoy.bria.apiKeyExistingSecret.name }}
labels:
app: {{ template "galoy.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
type: Opaque
data:
{{ .Values.bria.apiKeyExistingSecret.key }}: {{ .Values.secrets.briaApiKey | toString | b64enc }}

---

{{ if .Values.postgresql.enabled }}

apiVersion: v1
Expand Down
1 change: 1 addition & 0 deletions charts/galoy/templates/trigger-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ spec:
{{ include "galoy.bitcoind.env" . | indent 8 }}
{{ include "galoy.lnd1.env" . | indent 8 }}
{{ include "galoy.lnd2.env" . | indent 8 }}
{{ include "galoy.bria.env" . | indent 8 }}

{{/* API Specifics */}}
{{ include "galoy.twilio.env" . | indent 8 }}
Expand Down
14 changes: 14 additions & 0 deletions charts/galoy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ galoy:
cronConfig:
rebalanceEnabled: true
swapEnabled: true
bria:
hotWalletName: dev
queueNames:
fast: fast
## Docker Images for running Galoy Banking Codebase
##
images:
Expand Down Expand Up @@ -395,6 +399,14 @@ galoy:
name: bitcoind-rpcpassword
## Secret Key
key: password

bria:
host: bria.default.svc.cluster.local
port: 2742
apiKeyExistingSecret:
name: bria-api-key
key: api-key

## Dealer Service Connection details
##
dealer:
Expand Down Expand Up @@ -553,6 +565,8 @@ secrets:
lnd2LoopMacaroon:
lnd2LoopTls:
lnd2PubKey:
## Secrets for Bria
briaApiKey:
## Secret for Galoy app
kratosMasterUserPassword:
kratosCallbackApiKey:
Expand Down
11 changes: 11 additions & 0 deletions ci/testflight/galoy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ resource "kubernetes_secret" "network" {
data = data.kubernetes_secret.network.data
}

resource "kubernetes_secret" "bria" {
metadata {
name = "bria-api-key"
namespace = kubernetes_namespace.testflight.metadata[0].name
}

data = {
key = ""
}
}

resource "kubernetes_secret" "gcs_sa_key" {
metadata {
name = "gcs-sa-key"
Expand Down
3 changes: 3 additions & 0 deletions ci/testflight/galoy/testflight-values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ galoy:
lnd2:
dns: lnd2.galoy-staging-bitcoin.svc.cluster.local

bria:
host: bria.galoy-staging-bitcoin.svc.cluster.local

dealer:
host: dealer-price.galoy-staging-addons.svc.cluster.local

Expand Down
11 changes: 11 additions & 0 deletions dev/galoy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ resource "kubernetes_secret" "jwt_secret" {
}
}

resource "kubernetes_secret" "bria" {
metadata {
name = "bria-api-key"
namespace = kubernetes_namespace.galoy.metadata[0].name
}

data = {
key = ""
}
}

resource "kubernetes_secret" "gcs_sa_key" {
metadata {
name = "gcs-sa-key"
Expand Down

0 comments on commit d19ead9

Please sign in to comment.