Skip to content

Commit 7abe6ed

Browse files
committed
[stacks-blockchain-api] update permissions on archive
1 parent 8d96a8a commit 7abe6ed

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
dependencies:
22
- name: stacks-blockchain
33
repository: https://charts.hiro.so/hirosystems
4-
version: 1.1.2
4+
version: 1.1.3
55
- name: postgresql
66
repository: https://charts.bitnami.com/bitnami
77
version: 11.9.2
88
- name: common
99
repository: https://charts.bitnami.com/bitnami
1010
version: 1.17.1
11-
digest: sha256:a077314d0eecd44e0520accff01323bbe8c2df249b490697ce948cc07ab3ef28
12-
generated: "2022-09-28T14:03:25.537763-04:00"
11+
digest: sha256:8c828a2da30f9e792b7f1e8a4df8ed40326b0e2e934220e89ea0eed363046ff6
12+
generated: "2022-09-28T14:27:21.702363-04:00"

hirosystems/stacks-blockchain-api/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ sources:
4141
- https://github.com/hirosystems/stacks-blockchain-api
4242
- https://docs.hiro.so/api
4343
- https://docs.hiro.so/get-started/stacks-blockchain-api
44-
version: 1.1.2
44+
version: 1.1.3

hirosystems/stacks-blockchain-api/templates/api-writer/statefulset.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ spec:
162162
wget ${ARCHIVE_URL} -O ${DATA_DIR}/archive.tar.gz
163163
tar zxvf ${DATA_DIR}/archive.tar.gz -C ${DATA_DIR}
164164
rm -f ${DATA_DIR}/archive.tar.gz
165+
echo "Setting permissions"
166+
chown -R {{ .Values.apiWriter.containerSecurityContext.runAsUser }}:{{ .Values.apiWriter.containerSecurityContext.fsGroup }} ${DATA_DIR}
167+
chown -R {{ .Values.apiWriter.containerSecurityContext.runAsUser }}:{{ .Values.apiWriter.containerSecurityContext.fsGroup }} {{ .Values.apiWriter.persistence.bns.mountPath }}
165168
else
166169
echo "Previous data found. Exiting."
167170
fi
@@ -177,6 +180,8 @@ spec:
177180
{{- if .Values.apiWriter.persistence.data.subPath }}
178181
subPath: {{ .Values.apiWriter.persistence.data.subPath }}
179182
{{- end }}
183+
- name: bns-data
184+
mountPath: {{ .Values.apiWriter.persistence.bns.mountPath }}
180185
{{- end }}
181186
{{- if .Values.apiWriter.volumePermissions.enabled }}
182187
- name: volume-permissions
@@ -200,6 +205,8 @@ spec:
200205
{{- if .Values.apiWriter.persistence.data.subPath }}
201206
subPath: {{ .Values.apiWriter.persistence.data.subPath }}
202207
{{- end }}
208+
- name: bns-data
209+
mountPath: {{ .Values.apiWriter.persistence.bns.mountPath }}
203210
{{- end }}
204211
{{- if .Values.apiWriter.config.replayEvents }}
205212
- name: replay-events
@@ -225,6 +232,18 @@ spec:
225232
secretKeyRef:
226233
key: {{ include "postgresql.adminPasswordKey" .Subcharts.postgresql | quote }}
227234
name: {{ include "postgresql.secretName" .Subcharts.postgresql | quote }}
235+
- name: PG_IDENT_INDEX_TYPE
236+
value: hash
237+
- name: NODE_ENV
238+
value: production
239+
- name: BNS_IMPORT_DIR
240+
value: {{ .Values.apiWriter.persistence.bns.mountPath }}
241+
- name: STACKS_API_EVENT_REPLAY_LOG_LEVEL
242+
value: debug
243+
- name: STACKS_API_ENABLE_FT_METADATA
244+
value: {{ ternary "1" "0" .Values.apiWriter.config.enableFtMetadata | quote }}
245+
- name: STACKS_API_ENABLE_NFT_METADATA
246+
value: {{ ternary "1" "0" .Values.apiWriter.config.enableNftMetadata | quote }}
228247
command:
229248
- sh
230249
- -c
@@ -242,6 +261,8 @@ spec:
242261
{{- if .Values.apiWriter.persistence.data.subPath }}
243262
subPath: {{ .Values.apiWriter.persistence.data.subPath }}
244263
{{- end }}
264+
- name: bns-data
265+
mountPath: {{ .Values.apiWriter.persistence.bns.mountPath }}
245266
{{- end }}
246267
{{- if .Values.apiWriter.initContainers }}
247268
{{- include "common.tplvalues.render" (dict "value" .Values.apiWriter.initContainers "context" $) | nindent 8 }}
@@ -310,6 +331,8 @@ spec:
310331
- name: PG_CONNECTION_POOL_MAX
311332
value: {{ default "50" .Values.apiWriter.config.pgConnectionPoolMax | quote }}
312333
{{- if .Values.cdn.enabled }}
334+
- name: PG_IDENT_INDEX_TYPE
335+
value: hash
313336
- name: IMGIX_TOKEN
314337
valueFrom:
315338
secretKeyRef:

0 commit comments

Comments
 (0)