Skip to content

Commit

Permalink
configurable ports
Browse files Browse the repository at this point in the history
  • Loading branch information
sambukowski committed Sep 20, 2024
1 parent 2c84f2d commit 7e8b571
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 21 deletions.
14 changes: 7 additions & 7 deletions charts/graph-node/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ spec:
- name: graph-node
image: {{ .Values.graphNode.image }}:{{ .Values.graphNode.tag }}
ports:
- containerPort: 8000
- containerPort: 8001
- containerPort: 8020
- containerPort: 8030
- containerPort: 8040
- containerPort: {{ .Values.graphNode.ports.http | default 8000 }}
- containerPort: {{ .Values.graphNode.ports.jsonRpc | default 8001 }}
- containerPort: {{ .Values.graphNode.ports.indexNode | default 8020 }}
- containerPort: {{ .Values.graphNode.ports.metrics | default 8030 }}
- containerPort: {{ .Values.graphNode.ports.subgraphMetrics | default 8040 }}
env:
- name: postgres_host
value: postgres
Expand Down Expand Up @@ -59,7 +59,7 @@ spec:
- name: ipfs
image: {{ .Values.ipfs.image }}:{{ .Values.ipfs.tag }}
ports:
- containerPort: 5001
- containerPort: {{ .Values.ipfs.ports.api | default 5001 }}
volumeMounts:
- name: ipfs-storage
mountPath: /data/ipfs
Expand Down Expand Up @@ -90,7 +90,7 @@ spec:
- name: postgres
image: {{ .Values.postgres.image }}:{{ .Values.postgres.tag }}
ports:
- containerPort: 5432
- containerPort: {{ .Values.postgres.ports.postgres | default 5432 }}
env:
- name: POSTGRES_USER
value: {{ .Values.postgres.user }}
Expand Down
31 changes: 17 additions & 14 deletions charts/graph-node/templates/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,51 @@ apiVersion: v1
kind: Service
metadata:
name: graph-node
namespace: {{ .Values.global.namespaceOverride | default .Release.Namespace }}
spec:
selector:
app: graph-node
ports:
- name: http
port: 8000
targetPort: 8000
port: {{ .Values.graphNode.ports.http | default 8000 }}
targetPort: {{ .Values.graphNode.ports.http | default 8000 }}
- name: json-rpc
port: 8001
targetPort: 8001
port: {{ .Values.graphNode.ports.jsonRpc | default 8001 }}
targetPort: {{ .Values.graphNode.ports.jsonRpc | default 8001 }}
- name: index-node
port: 8020
targetPort: 8020
port: {{ .Values.graphNode.ports.indexNode | default 8020 }}
targetPort: {{ .Values.graphNode.ports.indexNode | default 8020 }}
- name: metrics
port: 8030
targetPort: 8030
port: {{ .Values.graphNode.ports.metrics | default 8030 }}
targetPort: {{ .Values.graphNode.ports.metrics | default 8030 }}
- name: subgraph-metrics
port: 8040
targetPort: 8040
port: {{ .Values.graphNode.ports.subgraphMetrics | default 8040 }}
targetPort: {{ .Values.graphNode.ports.subgraphMetrics | default 8040 }}

---
apiVersion: v1
kind: Service
metadata:
name: ipfs
namespace: {{ .Values.global.namespaceOverride | default .Release.Namespace }}
spec:
selector:
app: ipfs
ports:
- name: api
port: 5001
targetPort: 5001
port: {{ .Values.ipfs.ports.api | default 5001 }}
targetPort: {{ .Values.ipfs.ports.api | default 5001 }}

---
apiVersion: v1
kind: Service
metadata:
name: postgres
namespace: {{ .Values.global.namespaceOverride | default .Release.Namespace }}
spec:
selector:
app: postgres
ports:
- name: postgres
port: 5432
targetPort: 5432
port: {{ .Values.postgres.ports.postgres | default 5432 }}
targetPort: {{ .Values.postgres.ports.postgres | default 5432 }}
10 changes: 10 additions & 0 deletions charts/graph-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ graphNode:
replicas: 1
metrics:
enabled: false
ports:
http: 8000
jsonRpc: 8001
indexNode: 8020
metrics: 8030
subgraphMetrics: 8040

ingress:
enabled: true
Expand All @@ -32,6 +38,8 @@ ipfs:
tag: v0.17.0
storage:
size: 5Gi
ports:
api: 5001

postgres:
image: postgres
Expand All @@ -41,6 +49,8 @@ postgres:
database: graph-node
storage:
size: 10Gi
ports:
postgres: 5432

environment:
ethereumNetwork: flame-local
Expand Down

0 comments on commit 7e8b571

Please sign in to comment.