forked from graphprotocol/indexer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
k8s: Update resources/configs to use the latest recommendations
- Use graph-node.toml config file - Use dedicated block_ingestor pod - Improve query-node update strategy - Use specific image version tags rather than `latest` - Include cert manager
- Loading branch information
Showing
24 changed files
with
286 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: index-node-block-ingestor | ||
labels: | ||
app: block-ingestor | ||
network: all | ||
spec: | ||
selector: | ||
app: block-ingestor | ||
network: all | ||
ports: | ||
- name: json-rpc | ||
protocol: TCP | ||
port: 80 | ||
targetPort: 8020 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: index-node-block-ingestor | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: block-ingestor | ||
network: all | ||
serviceName: index-node-block-ingestor | ||
replicas: 1 | ||
podManagementPolicy: Parallel | ||
updateStrategy: | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
app: block-ingestor | ||
network: all | ||
annotations: | ||
prometheus.io/scrape: "true" | ||
prometheus.io/path: "/metrics" | ||
prometheus.io/port: "8040" | ||
spec: | ||
nodeSelector: | ||
index: "1" | ||
tolerations: | ||
- key: "index" | ||
operator: "Exists" | ||
effect: "NoSchedule" | ||
volumes: | ||
- name: nfs-shared | ||
persistentVolumeClaim: | ||
claimName: nfs-shared | ||
readOnly: false | ||
- name: graph-node-config | ||
configMap: | ||
name: graph-node-config | ||
containers: | ||
- name: graph-node | ||
image: graph-node-image | ||
resources: | ||
requests: | ||
cpu: 600m | ||
ports: | ||
- name: http | ||
containerPort: 8000 | ||
- name: json-rpc | ||
containerPort: 8020 | ||
- name: metrics | ||
containerPort: 8040 | ||
volumeMounts: | ||
- name: nfs-shared | ||
mountPath: /var/lib/graph | ||
- name: graph-node-config | ||
mountPath: /etc/graph-node | ||
env: | ||
- name: node_id | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: GRAPH_NODE_CONFIG | ||
value: /etc/graph-node/graph-node.toml | ||
- name: GRAPH_KILL_IF_UNRESPONSIVE | ||
value: "true" | ||
- name: GRAPH_LOG | ||
value: debug | ||
- name: postgres_host | ||
valueFrom: | ||
secretKeyRef: | ||
name: postgres-credentials | ||
key: host | ||
- name: postgres_user | ||
valueFrom: | ||
secretKeyRef: | ||
name: postgres-credentials | ||
key: user | ||
- name: postgres_pass | ||
valueFrom: | ||
secretKeyRef: | ||
name: postgres-credentials | ||
key: password | ||
- name: postgres_db | ||
valueFrom: | ||
secretKeyRef: | ||
name: postgres-credentials | ||
key: graph_db | ||
- name: ipfs | ||
value: https://ipfs.network.thegraph.com | ||
- name: GRAPH_ALLOW_NON_DETERMINISTIC_IPFS | ||
value: "true" | ||
- name: GRAPH_ALLOW_NON_DETERMINISTIC_FULLTEXT_SEARCH | ||
value: "true" | ||
|
||
# Avoid some subgraphs fail with "Gas limit exceeded" error | ||
- name: GRAPH_MAX_GAS_PER_HANDLER | ||
value: "1_000_000_000_000_000" | ||
- name: GRAPH_ETHEREUM_REQUEST_RETRIES | ||
value: "30" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[general] | ||
query = "query_node_.*" | ||
|
||
[store] | ||
[store.primary] | ||
connection = "postgresql://$postgres_user:$postgres_pass@$postgres_host/$postgres_db" | ||
pool_size = [ | ||
{ node = "query_node_.*", size = 60 }, | ||
{ node = "index_node_.*", size = 35 }, | ||
{ node = "index_node_block_ingestor_.*", size = 4 }, | ||
] | ||
|
||
[deployment] | ||
[[deployment.rule]] | ||
store = "primary" | ||
indexers = [ "index_node_0", "index_node_1" ] | ||
|
||
[chains] | ||
ingestor = "index_node_block_ingestor_0" | ||
|
||
[chains.mainnet] | ||
shard = "primary" | ||
provider = [ | ||
{ label = "mainnet-0", url = "https://eth-mainnet.node/", features = ["archive", "traces"] } | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ spec: | |
- name: syncing | ||
protocol: TCP | ||
port: 8002 | ||
targetPort: 8002 | ||
targetPort: 8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
name: self-signed-issuer | ||
namespace: default | ||
spec: | ||
selfSigned: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.