diff --git a/charts/horizon/templates/ingest-configmap.yaml b/charts/horizon/templates/ingest-configmap.yaml index be531b6..cf69686 100644 --- a/charts/horizon/templates/ingest-configmap.yaml +++ b/charts/horizon/templates/ingest-configmap.yaml @@ -11,35 +11,33 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} data: - ADMIN_PORT: {{ .Values.ingest.horizonConfig.adminPort | default "6000" | quote}} - APPLY_MIGRATIONS: {{ .Values.ingest.horizonConfig.applyMigrations | default "false" | quote}} - ALLOW_EMPTY_LEDGER_DATA_RESPONSES: {{ .Values.ingest.horizonConfig.allowEmptyLedgerDataResponses | default "true" | quote}} + ADMIN_PORT: {{ .Values.ingest.horizonConfig.adminPort | quote}} + APPLY_MIGRATIONS: {{ .Values.ingest.horizonConfig.applyMigrations | quote}} + ALLOW_EMPTY_LEDGER_DATA_RESPONSES: {{ .Values.ingest.horizonConfig.allowEmptyLedgerDataResponses | quote}} CAPTIVE_CORE_CONFIG_APPEND_PATH: "/config/stellar-core.cfg" CAPTIVE_CORE_REUSE_STORAGE_PATH: "True" CAPTIVE_CORE_REUSE_STORAGE_DIR: "True" CAPTIVE_CORE_STORAGE_PATH: "/var/lib/stellar" - CAPTIVE_CORE_USE_DB: {{ .Values.ingest.horizonConfig.captiveCoreUseDb | default "False" | quote}} - CONNECTION_TIMEOUT: {{ .Values.ingest.horizonConfig.connectionTimeout | default "10" | quote}} - {{- if .Values.ingest.horizonConfig.disablePathFinding }} - DISABLE_PATH_FINDING: {{ .Values.ingest.horizonConfig.disablePathFinding | default "False" | quote}} - {{- end }} - ENABLE_ACCOUNTS_FOR_SIGNER: {{ .Values.ingest.horizonConfig.enableAccountsForSigner | default "false" | quote}} - ENABLE_ASSET_STATS: {{ .Values.ingest.horizonConfig.enableAssetStats | default "true" | quote}} + CAPTIVE_CORE_USE_DB: {{ .Values.ingest.horizonConfig.captiveCoreUseDb | quote}} + CONNECTION_TIMEOUT: {{ .Values.ingest.horizonConfig.connectionTimeout | quote}} + DISABLE_PATH_FINDING: {{ .Values.ingest.horizonConfig.disablePathFinding | quote}} + ENABLE_ACCOUNTS_FOR_SIGNER: {{ .Values.ingest.horizonConfig.enableAccountsForSigner | quote}} + ENABLE_ASSET_STATS: {{ .Values.ingest.horizonConfig.enableAssetStats | quote}} ENABLE_CAPTIVE_CORE_INGESTION: "true" ENABLE_EXPERIMENTAL_INGESTION: "false" {{- if .Values.ingest.horizonConfig.friendbotUrl }} - FRIENDBOT_URL: {{ .Values.ingest.horizonConfig.friendbotUrl | default "https://friendbot.stellar.org" | quote}} + FRIENDBOT_URL: {{ .Values.ingest.horizonConfig.friendbotUrl | quote}} {{- end }} HISTORY_ARCHIVE_URLS: {{ include "horizon.historyArchiveUrls" . | quote }} - HISTORY_RETENTION_COUNT: {{ .Values.ingest.horizonConfig.historyRetentionCount | default "34560" | quote}} - INGEST_FAILED_TRANSACTIONS: {{ .Values.ingest.horizonConfig.ingestFailedTransactions | default "true" | quote}} + HISTORY_RETENTION_COUNT: {{ .Values.ingest.horizonConfig.historyRetentionCount | quote}} + INGEST_FAILED_TRANSACTIONS: {{ .Values.ingest.horizonConfig.ingestFailedTransactions | quote}} INGEST: "true" - MAX_DB_CONNECTIONS: {{ .Values.ingest.horizonConfig.maxDBConnections | default "20" | quote}} + MAX_DB_CONNECTIONS: {{ .Values.ingest.horizonConfig.maxDBConnections | quote}} NETWORK_PASSPHRASE: {{ include "horizon.networkPassphrase" . | quote }} - PER_HOUR_RATE_LIMIT: {{ .Values.ingest.horizonConfig.perHourRateLimit | default "3600" | quote}} - PORT: {{ .Values.ingest.horizonConfig.port | default "8000" | quote}} - SSE_UPDATE_FREQUENCY: {{ .Values.ingest.horizonConfig.SseUpdateFrequency | default "4" | quote}} + PER_HOUR_RATE_LIMIT: {{ .Values.ingest.horizonConfig.perHourRateLimit | quote}} + PORT: {{ .Values.ingest.horizonConfig.port | quote}} + SSE_UPDATE_FREQUENCY: {{ .Values.ingest.horizonConfig.sseUpdateFrequency | quote}} STELLAR_CORE_BINARY_PATH: "/usr/bin/stellar-core" - STELLAR_CORE_URL: {{ .Values.ingest.horizonConfig.stellarCoreUrl | default "http://127.0.0.1:11626" | quote}} + STELLAR_CORE_URL: {{ .Values.ingest.horizonConfig.stellarCoreUrl | quote}} TMPDIR: "/var/lib/stellar" {{- end }} diff --git a/charts/horizon/templates/ingest-statefulset.yaml b/charts/horizon/templates/ingest-statefulset.yaml index 73d8821..f0a5902 100644 --- a/charts/horizon/templates/ingest-statefulset.yaml +++ b/charts/horizon/templates/ingest-statefulset.yaml @@ -51,9 +51,9 @@ spec: {{- end }} imagePullPolicy: {{ .Values.global.image.horizon.pullPolicy }} ports: - - containerPort: {{ .Values.ingest.horizonConfig.port | default 8000 }} + - containerPort: {{ .Values.ingest.horizonConfig.port }} name: horizon - - containerPort: {{ .Values.ingest.horizonConfig.adminPort | default 6000 }} + - containerPort: {{ .Values.ingest.horizonConfig.adminPort }} name: metrics - containerPort: 11626 name: core @@ -64,7 +64,7 @@ spec: name: {{ template "common.fullname" . }}-ingest-env readinessProbe: httpGet: - port: {{ .Values.ingest.horizonConfig.port | default 8000 }} + port: {{ .Values.ingest.horizonConfig.port }} path: /health initialDelaySeconds: 5 timeoutSeconds: 5 @@ -141,7 +141,7 @@ spec: ports: - name: horizon port: 80 - targetPort: {{ .Values.ingest.horizonConfig.port | default 8000 }} + targetPort: {{ .Values.ingest.horizonConfig.port }} selector: app: {{ template "common.fullname" . }}-ingest {{- end }} diff --git a/charts/horizon/templates/web-configmap.yaml b/charts/horizon/templates/web-configmap.yaml index d22bf41..2f86fa6 100644 --- a/charts/horizon/templates/web-configmap.yaml +++ b/charts/horizon/templates/web-configmap.yaml @@ -11,22 +11,22 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} data: + ADMIN_PORT: {{ .Values.web.horizonConfig.adminPort | quote}} + ALLOW_EMPTY_LEDGER_DATA_RESPONSES: {{ .Values.web.horizonConfig.allowEmptyLedgerDataResponses | quote}} + CONNECTION_TIMEOUT: {{ .Values.web.horizonConfig.connectionTimeout | quote}} + ENABLE_ACCOUNTS_FOR_SIGNER: {{ .Values.web.horizonConfig.enableAccountsForSigner | quote}} + ENABLE_ASSET_STATS: {{ .Values.web.horizonConfig.enableAssetStats | quote}} + HISTORY_ARCHIVE_URLS: {{ include "horizon.historyArchiveUrls" . | quote }} INGEST: "false" - PORT: {{ .Values.web.horizonConfig.port | default "8000" | quote}} - ADMIN_PORT: {{ .Values.web.horizonConfig.adminPort | default "6000" | quote}} + MAX_DB_CONNECTIONS: {{ .Values.web.horizonConfig.maxDBConnections | quote}} + MAX_PATH_LENGTH: {{ .Values.web.horizonConfig.maxPathLength | quote}} + NETWORK_PASSPHRASE: {{ include "horizon.networkPassphrase" . | quote }} + PER_HOUR_RATE_LIMIT: {{ .Values.web.horizonConfig.perHourRateLimit | quote}} + PORT: {{ .Values.web.horizonConfig.port | quote}} + SSE_UPDATE_FREQUENCY: {{ .Values.web.horizonConfig.sseUpdateFrequency | quote}} {{ if .Values.web.horizonConfig.stellarCoreUrl -}} STELLAR_CORE_URL: {{ .Values.web.horizonConfig.stellarCoreUrl | quote}} {{- else }} STELLAR_CORE_URL: http://{{ template "common.fullname" . }}-ingest-core:11626 {{- end }} - PER_HOUR_RATE_LIMIT: {{ .Values.web.horizonConfig.perHourRateLimit | default "8000" | quote}} - MAX_DB_CONNECTIONS: {{ .Values.web.horizonConfig.maxDBConnections | default "20" | quote}} - SSE_UPDATE_FREQUENCY: {{ .Values.web.horizonConfig.SseUpdateFrequency | default "4" | quote}} - CONNECTION_TIMEOUT: {{ .Values.web.horizonConfig.connectionTimeout | default "10" | quote}} - ALLOW_EMPTY_LEDGER_DATA_RESPONSES: {{ .Values.web.horizonConfig.allowEmptyLedgerDataResponses | default "true" | quote}} - ENABLE_ASSET_STATS: {{ .Values.web.horizonConfig.enableAssetStats | default "true" | quote}} - ENABLE_ACCOUNTS_FOR_SIGNER: {{ .Values.web.horizonConfig.enableAccountsForSigner | default "false" | quote}} - MAX_PATH_LENGTH: {{ .Values.web.horizonConfig.maxPathLength | default "3" | quote}} - HISTORY_ARCHIVE_URLS: {{ include "horizon.historyArchiveUrls" . | quote }} - NETWORK_PASSPHRASE: {{ include "horizon.networkPassphrase" . | quote }} {{- end }} diff --git a/charts/horizon/templates/web-deployment.yaml b/charts/horizon/templates/web-deployment.yaml index 4e8b9db..7766b63 100644 --- a/charts/horizon/templates/web-deployment.yaml +++ b/charts/horizon/templates/web-deployment.yaml @@ -49,9 +49,9 @@ spec: {{- end }} imagePullPolicy: {{ .Values.global.image.horizon.pullPolicy }} ports: - - containerPort: {{ .Values.web.horizonConfig.port | default 8000 }} + - containerPort: {{ .Values.web.horizonConfig.port }} name: horizon - - containerPort: {{ .Values.web.horizonConfig.adminPort | default 6000 }} + - containerPort: {{ .Values.web.horizonConfig.adminPort }} name: metrics envFrom: - secretRef: @@ -60,7 +60,7 @@ spec: name: {{ template "common.fullname" . }}-web-env readinessProbe: httpGet: - port: {{ .Values.web.horizonConfig.port | default 8000 }} + port: {{ .Values.web.horizonConfig.port }} path: /health initialDelaySeconds: 5 timeoutSeconds: 5 @@ -84,7 +84,7 @@ spec: ports: - name: core port: 80 - targetPort: {{ .Values.web.horizonConfig.port | default 8000 }} + targetPort: {{ .Values.web.horizonConfig.port }} selector: app: {{ template "common.fullname" . }}-web {{- end }} diff --git a/charts/horizon/values.yaml b/charts/horizon/values.yaml index cb600a0..bbb3850 100644 --- a/charts/horizon/values.yaml +++ b/charts/horizon/values.yaml @@ -56,11 +56,24 @@ ingest: cliArgs: - "--apply-migrations" - ## This variable allows overrides of default settings + ## Horizon config horizonConfig: + adminPort: 6000 + allowEmptyLedgerDataResponses: true applyMigrations: false - # port: 8001 - + captiveCoreUseDb: false + connectionTimeout: 10 + disablePathFinding: false + enableAccountsForSigner: false + enableAssetStats: true + friendbotUrl: "" + historyRetentionCount: 34560 + ingestFailedTransactions: true + maxDBConnections: 20 + perHourRateLimit: 3600 + port: 8000 + sseUpdateFrequency: 4 + stellarCoreUrl: "http://127.0.0.1:11626" ## pre existing secret that contains the DATABASE_URL key with postgres URL existingSecret: "" @@ -135,9 +148,19 @@ web: ## List of CLI arguments to provide to the stellar-horizon binary cliArgs: [] - ## This variable allows overrides of default settings - horizonConfig: {} - # port: 8001 + ## Horizon config + horizonConfig: + adminPort: 6000 + allowEmptyLedgerDataResponses: true + connectionTimeout: 10 + enableAccountsForSigner: false + enableAssetStats: true + maxDBConnections: 20 + maxPathLength: 3 + perHourRateLimit: 8000 + port: 8000 + sseUpdateFrequency: 4 + stellarCoreUrl: "" # defaults to igest's core instance ## pre existing secret that contains the DATABASE_URL key with postgres URL existingSecret: ""