From f4aab43a3136fbbf21d3708345e4953464c5146a Mon Sep 17 00:00:00 2001 From: CharlieC3 <2747302+CharlieC3@users.noreply.github.com> Date: Thu, 1 Dec 2022 10:13:48 -0500 Subject: [PATCH] [stacks-blockchain-api] rev app version, make pruned event replays configurable --- hirosystems/stacks-blockchain-api/Chart.lock | 6 +++--- hirosystems/stacks-blockchain-api/Chart.yaml | 4 ++-- .../templates/api-writer/statefulset.yaml | 7 ++++++- hirosystems/stacks-blockchain-api/values.yaml | 8 +++++--- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/hirosystems/stacks-blockchain-api/Chart.lock b/hirosystems/stacks-blockchain-api/Chart.lock index a2712fd..c609dba 100644 --- a/hirosystems/stacks-blockchain-api/Chart.lock +++ b/hirosystems/stacks-blockchain-api/Chart.lock @@ -1,12 +1,12 @@ dependencies: - name: stacks-blockchain repository: https://charts.hiro.so/hirosystems - version: 1.1.12 + version: 1.2.0 - name: postgresql repository: https://charts.bitnami.com/bitnami version: 11.9.13 - name: common repository: https://charts.bitnami.com/bitnami version: 1.17.1 -digest: sha256:807ee4702978db4e0c6c4981810f30a9c18d73084f5569d9a7632d68b9e1273c -generated: "2022-10-31T13:35:32.029737-04:00" +digest: sha256:fb18356ab7eb70dfd46a4e858347e9f2810b05e8f748bcbae591ed38061e8c3a +generated: "2022-12-01T10:01:14.243074-05:00" diff --git a/hirosystems/stacks-blockchain-api/Chart.yaml b/hirosystems/stacks-blockchain-api/Chart.yaml index a1c56b1..ce83e16 100644 --- a/hirosystems/stacks-blockchain-api/Chart.yaml +++ b/hirosystems/stacks-blockchain-api/Chart.yaml @@ -1,7 +1,7 @@ annotations: category: ApplicationServer apiVersion: v2 -appVersion: 6.1.1 +appVersion: 6.2.1 dependencies: - condition: stacks-blockchain.enabled name: stacks-blockchain @@ -41,4 +41,4 @@ sources: - https://github.com/hirosystems/stacks-blockchain-api - https://docs.hiro.so/api - https://docs.hiro.so/get-started/stacks-blockchain-api -version: 1.2.0 +version: 1.3.0 diff --git a/hirosystems/stacks-blockchain-api/templates/api-writer/statefulset.yaml b/hirosystems/stacks-blockchain-api/templates/api-writer/statefulset.yaml index ccc09a0..4c60260 100644 --- a/hirosystems/stacks-blockchain-api/templates/api-writer/statefulset.yaml +++ b/hirosystems/stacks-blockchain-api/templates/api-writer/statefulset.yaml @@ -207,7 +207,7 @@ spec: - name: bns-data mountPath: {{ .Values.apiWriter.persistence.bns.mountPath }} {{- end }} - {{- if .Values.apiWriter.config.replayEvents }} + {{- if .Values.apiWriter.config.replayEvents.enabled }} - name: replay-events image: {{ template "stacksBlockchainApi.image" . }} imagePullPolicy: {{ .Values.apiWriter.pullPolicy | quote }} @@ -246,8 +246,13 @@ spec: command: - sh - -c + {{- if .Values.apiWriter.config.replayEvents.prunedMode }} - | node ./lib/index.js import-events --file ${STACKS_EXPORT_EVENTS_FILE} --wipe-db --force --mode pruned + {{- else }} + - | + node ./lib/index.js import-events --file ${STACKS_EXPORT_EVENTS_FILE} --wipe-db --force + {{- end }} {{- if .Values.apiWriter.initContainerSecurityContext.enabled }} securityContext: {{- omit .Values.apiWriter.initContainerSecurityContext "enabled" | toYaml | nindent 12 }} {{- end }} diff --git a/hirosystems/stacks-blockchain-api/values.yaml b/hirosystems/stacks-blockchain-api/values.yaml index 8c086c9..686b21c 100644 --- a/hirosystems/stacks-blockchain-api/values.yaml +++ b/hirosystems/stacks-blockchain-api/values.yaml @@ -74,7 +74,9 @@ apiWriter: # dataArchiveUrl: https://storage.googleapis.com/hirosystems-archive/mainnet/api/mainnet-blockchain-api-5.0.0-latest.tar.gz # Replay events from the API's TSV file into the Postgres database # CAUTION: THIS WILL WIPE YOUR CURRENT DATABASE - replayEvents: false + replayEvents: + enabled: false + prunedMode: true exportEvents: false enableFtMetadata: true enableNftMetadata: false @@ -94,7 +96,7 @@ apiWriter: image: registry: docker.io repository: hirosystems/stacks-blockchain-api - tag: 6.1.1 + tag: 6.2.1 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images @@ -587,7 +589,7 @@ apiReader: image: registry: docker.io repository: hirosystems/stacks-blockchain-api - tag: 6.1.1 + tag: 6.2.1 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images