Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion charts/stellar-disbursement-platform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This chart bootstraps a Stellar Disbursement Platform (SDP) deployment on a [Kub

The SDP is a set of services that enable organizations to disburse funds to recipients using the Stellar network. The SDP consists of the following services:
- Stellar Disbursement Platform (SDP) Core Service: the core backend service that performs several functions.
- Anchor Platform: the API server that the wallet uses to authenticate and initiate the recipients registration process through the SEP-24 deposit flow.
- Anchor Platform (optional): the API server that the wallet uses to authenticate and initiate the recipient's registration process through the SEP-24 deposit flow. **Note**: Anchor Platform can be disabled via `global.enableAnchorPlatform` (default: `false`).
- Transaction Submission Service (TSS): the service that submits all payment transactions to the Stellar network.
- Dashboard: the user interface administrators use to initiate and track the progress of disbursements.

Expand Down Expand Up @@ -181,6 +181,7 @@ These parameters are shared by all charts.
| `global.bridgeIntegration.enabled` | Determines if the bridge integration is enabled. If set to true, the bridge integration will be enabled. | `false` |
| `global.bridgeIntegration.baseUrl` | The base URL of the bridge api. | `nil` |
| `global.bridgeIntegration.apiKey` | The API key for the bridge integration. | `nil` |
| `global.enableAnchorPlatform` | Determines if the Anchor Platform service should be deployed. When disabled, SDP will not have Anchor Platform integration. | `false` |

### Stellar Disbursement Platform (SDP) parameters

Expand Down Expand Up @@ -235,6 +236,7 @@ Configuration parameters for the SDP Core Service which is the core backend serv
| `sdp.configMap.data.MAX_INVITATION_RESEND_ATTEMPTS` | The maximum number of times an invitation can be resent. 0 or negative values disable the job. | `3` |
| `sdp.configMap.data.TENANT_XLM_BOOTSTRAP_AMOUNT` | The amount of XLM to be sent to a newly created tenant distribution account. | `5` |
| `sdp.configMap.data.CIRCLE_API_TYPE` | The type of Circle API to be used. Options: "TRANSFERS", "PAYOUTS". Default: "TRANSFERS". | `TRANSFERS` |
| `sdp.configMap.data.ENABLE_ANCHOR_PLATFORM` | Determines if Anchor Platform integration is enabled. This is automatically set based on `global.enableAnchorPlatform`. | `false` |
| `sdp.configMap.data.ENABLE_BRIDGE_INTEGRATION` | Determines if the bridge integration is enabled. If set to true, the bridge integration will be enabled. | |
| `sdp.configMap.data.BRIDGE_BASE_URL` | The base URL of the bridge API. Required if ENABLE_BRIDGE_INTEGRATION is set to true. | |
| `sdp.kubeSecrets` | Kubernetes secrets are used to manage sensitive information, such as API keys and private keys. It's crucial that these details are kept private. | |
Expand Down Expand Up @@ -280,6 +282,8 @@ Configuration parameters for the SDP Core Service which is the core backend serv
Configuration parameters for the Anchor Platform which is the API server that the wallet uses to authenticate and initiate
the recipient's registration process through the SEP-24 deposit flow.

**Note**: This section is only used when `global.enableAnchorPlatform` is set to `true`. When disabled, SDP will not have Anchor Platform integration and related configurations will not be included in the SDP configmap.

| Name | Description | Value |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------- |
| `anchorPlatform.route` | Configuration related to the routing of the Anchor Platform service. | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ data:
PORT: {{ include "sdp.port" . | quote }}
METRICS_PORT: {{ include "sdp.metricsPort" . | quote }}
ADMIN_PORT: {{ include "sdp.adminPort" . | quote }}
{{- if .Values.global.enableAnchorPlatform }}
ANCHOR_PLATFORM_BASE_SEP_URL: {{ include "sdp.ap.baseURL" . | quote }}
ANCHOR_PLATFORM_BASE_PLATFORM_URL: {{ include "sdp.ap.platformServiceAddress" . | quote }}
{{- end }}
{{- /*
Values from the `global` section
*/}}
Expand All @@ -37,6 +39,7 @@ Values from the `global` section
KAFKA_SECURITY_PROTOCOL: {{ .eventBroker.kafka.securityProtocol | quote }}
{{- end }}
SINGLE_TENANT_MODE: {{ .singleTenantMode | quote }}
ENABLE_ANCHOR_PLATFORM: {{ .enableAnchorPlatform | quote }}
{{- if .distributionPublicKey }}
DISTRIBUTION_PUBLIC_KEY: {{ .distributionPublicKey | quote }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.global.enableAnchorPlatform }}
---
apiVersion: v1
kind: ConfigMap
Expand Down Expand Up @@ -98,4 +99,5 @@ data:
{{- /*
Values from the ap configmap section - These will override the global values
*/}}
{{- tpl (toYaml .Values.anchorPlatform.configMap.data | nindent 2) . }}
{{- tpl (toYaml .Values.anchorPlatform.configMap.data | nindent 2) . }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.global.enableAnchorPlatform }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -128,3 +129,4 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.global.enableAnchorPlatform }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -19,3 +20,4 @@ spec:

selector:
{{- include "sdp.selectorLabelsWithSuffix" (list . "-ap") | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.anchorPlatform.ingress.enabled -}}
{{- if and .Values.global.enableAnchorPlatform .Values.anchorPlatform.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.anchorPlatform.kubeSecrets.create -}}
{{- if and .Values.global.enableAnchorPlatform .Values.anchorPlatform.kubeSecrets.create -}}
---
apiVersion: v1
kind: Secret
Expand Down
7 changes: 7 additions & 0 deletions charts/stellar-disbursement-platform/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,13 @@ Returns: ECDSA private key in PEM format
{{- $key -}}
{{- end -}}

{{/*
Is Anchor Platform enabled?
*/}}
{{- define "isAnchorPlatformEnabled" -}}
{{- eq .Values.global.enableAnchorPlatform true | default false }}
{{- end }}

{{/*
SDP base URL with schema and domain
*/}}
Expand Down
17 changes: 12 additions & 5 deletions charts/stellar-disbursement-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ global:
## @param global.singleTenantMode Determines if the SDP service is running in single-tenant mode.
singleTenantMode: false

## @param global.enableAnchorPlatform Determines if the Anchor Platform service should be deployed. When disabled, SDP will not have Anchor Platform integration.
enableAnchorPlatform: false

## @param global.distributionPublicKey The public key of the HOST's Stellar distribution account, used to create channel accounts.
## @param global.distributionPrivateKey The private key of the root Stellar distribution account
distributionPublicKey: #required
Expand Down Expand Up @@ -340,11 +343,15 @@ sdp:
# NOTE: the hosts to be used here will be the same ones as in the sdp.route section.

# =========================== START anchorPlatform ===========================
## @section Anchor Platform
## @descriptionStart
## Configuration parameters for the Anchor Platform which is the API server that the wallet uses to authenticate and initiate
## the recipient's registration process through the SEP-24 deposit flow.
## @descriptionEnd
## @section Anchor Platform
## @descriptionStart
## Configuration parameters for the Anchor Platform which is the API server that the wallet uses to authenticate and initiate
## the recipient's registration process through the SEP-24 deposit flow.
##
## Note: This section is only used when `global.enableAnchorPlatform` is set to `true`.
## When disabled, SDP will not have Anchor Platform integration and related configurations
## will not be included in the SDP configmap.
## @descriptionEnd
anchorPlatform:

## @extra anchorPlatform.route Configuration related to the routing of the Anchor Platform service.
Expand Down