Skip to content

Commit

Permalink
Chart/improvements rebased (#13)
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Gutierrez <[email protected]>
  • Loading branch information
AlfredoG87 authored Oct 13, 2023
1 parent a8c0baa commit 33e32a2
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: curl --retry 3 -fsL https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash

- name: Create k3d cluster
run: k3d cluster create relay --agents 1 --timeout 5m --registry-create registry:0.0.0.0:5001 --image rancher/k3s:v1.25.9-k3s1
run: k3d cluster create hedera-graph-node --agents 1 --timeout 5m --registry-create registry:0.0.0.0:5001 --image rancher/k3s:v1.25.9-k3s1
timeout-minutes: 3

- name: Set up Docker Qemu
Expand Down
10 changes: 6 additions & 4 deletions charts/hedera-the-graph-node/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ metadata:
name: {{ include "hedera-the-graph-node.fullname" . }}-config
labels:
{{- include "hedera-the-graph-node.labels" . | nindent 4 }}
data:
{{- if not (hasKey .Values.config.ipfs "fromConfigMap") }}
data:
{{- if not (hasKey .Values.config.ipfs "fromConfigMap") }}
IPFS: {{ .Values.config.ipfs.value | quote }}
{{- end }}
{{- if not (hasKey .Values.postgres.host "fromConfigMap") }}
{{- if not (hasKey .Values.postgres.host "fromConfigMap") }}
PG_HOST: {{ .Values.postgres.host.value | quote }}
{{- end }}
{{- if not (hasKey .Values.postgres.db "fromConfigMap") }}
{{- if not (hasKey .Values.postgres.db "fromConfigMap") }}
PG_DB: {{ .Values.postgres.db.value | quote }}
{{- end }}
# add hedera env vars from values.yaml
{{- .Values.config.hederaEnvVars | toYaml | trim | nindent 2 -}}
13 changes: 3 additions & 10 deletions charts/hedera-the-graph-node/templates/deployment-index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,9 @@ spec:
name: {{ include "hedera-the-graph-node.fullname" . }}-config
key: PG_DB
{{- end }}
# Env Config for Index-Node
{{- range .Values.hederaEnvVars.indexNode }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
# Extra Env vars
{{- range .Values.extraEnvVars }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "hedera-the-graph-node.fullname" . }}-config
ports:
- name: metrics
containerPort: 8040
Expand Down
13 changes: 3 additions & 10 deletions charts/hedera-the-graph-node/templates/deployment-query.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,9 @@ spec:
name: {{ include "hedera-the-graph-node.fullname" . }}-config
key: PG_DB
{{- end }}
# Env Config for Query-Node
{{- range .Values.hederaEnvVars.queryNode }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
# Extra Env vars values
{{- range .Values.extraEnvVars }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "hedera-the-graph-node.fullname" . }}-config
ports:
- name: metrics
containerPort: 8040
Expand Down
1 change: 0 additions & 1 deletion charts/hedera-the-graph-node/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ data:
{{- if not (hasKey .Values.postgres.user "fromSecret") }}
PG_USERNAME: {{ .Values.postgres.user.value | b64enc | quote }}
{{- end }}

48 changes: 12 additions & 36 deletions charts/hedera-the-graph-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,21 @@ config:
# fromConfigMap:
# name:
# key:

extraEnvVars: []
# - name: key1
# value: value1
# - name: key2
# value: value2
hederaEnvVars:
ETHEREUM_BLOCK_BATCH_SIZE: "1"
ETHEREUM_POLLING_INTERVAL: "1000"
ETHEREUM_REORG_THRESHOLD: "0"
GRAPH_ETHEREUM_BLOCK_INGESTOR_MAX_CONCURRENT_JSON_RPC_CALLS_FOR_TXN_RECEIPTS: "100"
GRAPH_ETHEREUM_CLEANUP_BLOCKS: "true"
GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER: "0"
GRAPH_ETHEREUM_MAX_BLOCK_RANGE_SIZE: "1000"
GRAPH_ETHEREUM_MAX_EVENT_ONLY_RANGE: "50"
GRAPH_KILL_IF_UNRESPONSIVE: "false"
GRAPH_LOG: "debug"
extraEnvVars: {}

fullnameOverride: ''

hederaEnvVars:
queryNode:
- name: "GRAPH_KILL_IF_UNRESPONSIVE"
value: "false"
- name: "GRAPH_LOG"
value: "debug"
- name: "GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER"
value: "0"
indexNode:
- name: "GRAPH_KILL_IF_UNRESPONSIVE"
value: "false"
- name: "GRAPH_LOG"
value: "debug"
- name: "GRAPH_ETHEREUM_MAX_BLOCK_RANGE_SIZE"
value: "1000"
- name: "GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER"
value: "0"
- name: "ETHEREUM_REORG_THRESHOLD"
value: "0"
- name: "ETHEREUM_POLLING_INTERVAL"
value: "1000"
- name: "ETHEREUM_BLOCK_BATCH_SIZE"
value: "1"
- name: "GRAPH_ETHEREUM_MAX_EVENT_ONLY_RANGE"
value: "50"
- name: "GRAPH_ETHEREUM_BLOCK_INGESTOR_MAX_CONCURRENT_JSON_RPC_CALLS_FOR_TXN_RECEIPTS"
value: "100"
- name: "GRAPH_ETHEREUM_CLEANUP_BLOCKS"
value: "true"

image:
pullPolicy: IfNotPresent
repository: graphprotocol/graph-node
Expand Down

0 comments on commit 33e32a2

Please sign in to comment.