Skip to content

Commit

Permalink
feat: add consent to galoy chart
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymindarts committed Oct 16, 2023
1 parent fe13755 commit a0ce7ba
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
8 changes: 8 additions & 0 deletions charts/galoy/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- default "trigger" .Values.galoy.trigger.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified consent name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "galoy.consent.fullname" -}}
{{- default "consent" .Values.galoy.consent.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
CronJob name
*/}}
Expand Down
50 changes: 50 additions & 0 deletions charts/galoy/templates/consent-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "galoy.consent.fullname" . }}
labels:
app: {{ template "galoy.consent.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: Helm

kube-monkey/enabled: enabled
kube-monkey/identifier: {{ template "galoy.trigger.fullname" . }}
kube-monkey/kill-mode: fixed
kube-monkey/kill-value: "1"
kube-monkey/mtbf: "8"
spec:
selector:
matchLabels:
app: {{ template "galoy.consent.fullname" . }}
release: {{ .Release.Name }}
replicas: {{ .Values.galoy.consent.replicas }}
template:
metadata:
labels:
app: {{ template "galoy.consent.fullname" . }}
release: "{{ .Release.Name }}"
kube-monkey/enabled: enabled
kube-monkey/identifier: {{ template "galoy.trigger.fullname" . }}
spec:
serviceAccountName: {{ template "galoy.name" . }}
containers:
- name: consent
image: "{{ .Values.galoy.images.consent.repository }}@{{ .Values.galoy.images.consent.digest }}"
resources:
{{- toYaml .Values.resources | nindent 10 }}
ports:
- name: http
containerPort: {{ .Values.galoy.consent.port }}
protocol: TCP
env:
- name: GRAPHQL_PUBLIC_API
value: {{ .Values.consent.graphqlPublicApi }}
- name: CORE_AUTH_URL
value: {{ .Values.consent.coreAuthUrl }}
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: {{ .Values.consent.tracing.otelExporterOtlpEndpoint }}
- name: TRACING_SERVICE_NAME
value: "{{ .Values.tracing.prefix }}-{{ template "galoy.trigger.fullname" . }}"
- name: HYDRA_ADMIN_URL
value: {{ .Values.consent.hydraAdminUrl }}
7 changes: 7 additions & 0 deletions charts/galoy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ galoy:
## Digest of the image
##
digest: "sha256:aa16b25de59adef5b13b391394c9b637ce79c64e20ca36d0798968b5028a08d2"
consent:
repository: us.gcr.io/galoy-org/galoy-consent
## Digest of the image
##
digest: "sha256:f0a9190ad0b1f4accddc938c7ebd08ee7e9006011864d68cc1ad4aae6451ac46"
## Galoy Application MongoDB Migration Image details
##
mongodbMigrate:
Expand Down Expand Up @@ -390,6 +395,8 @@ galoy:
enabled: false
mongoMigrationJob:
resources: {}
consent:
resources: {}
## Kratos
kratos:
publicApiUrl: http://galoy-kratos-public
Expand Down
2 changes: 2 additions & 0 deletions dev/.envrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
use flake ..

export KUBE_CONFIG_PATH=~/.kube/config
export KUBE_CTX=k3d-k3s-default

0 comments on commit a0ce7ba

Please sign in to comment.