diff --git a/charts/galoy/templates/_helpers.tpl b/charts/galoy/templates/_helpers.tpl index a4f10ca459..a4182de833 100644 --- a/charts/galoy/templates/_helpers.tpl +++ b/charts/galoy/templates/_helpers.tpl @@ -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 */}} diff --git a/charts/galoy/templates/consent-deployment.yaml b/charts/galoy/templates/consent-deployment.yaml new file mode 100644 index 0000000000..390780d52b --- /dev/null +++ b/charts/galoy/templates/consent-deployment.yaml @@ -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 }} diff --git a/charts/galoy/values.yaml b/charts/galoy/values.yaml index 8e0b770ebc..22b1a2f8b2 100644 --- a/charts/galoy/values.yaml +++ b/charts/galoy/values.yaml @@ -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: @@ -390,6 +395,8 @@ galoy: enabled: false mongoMigrationJob: resources: {} + consent: + resources: {} ## Kratos kratos: publicApiUrl: http://galoy-kratos-public diff --git a/dev/.envrc b/dev/.envrc index e769ec85cb..4d3371af7a 100644 --- a/dev/.envrc +++ b/dev/.envrc @@ -1,2 +1,4 @@ +use flake .. + export KUBE_CONFIG_PATH=~/.kube/config export KUBE_CTX=k3d-k3s-default