Skip to content

Commit

Permalink
merge op-geth sts into op-node
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiker committed Jan 30, 2024
1 parent 5a1c5fd commit 4086b39
Show file tree
Hide file tree
Showing 6 changed files with 138 additions and 168 deletions.
4 changes: 2 additions & 2 deletions templates/k8s/blockscout-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ spec:
- name: EMISSION_FORMAT
value: DEFAULT
- name: ETHEREUM_JSONRPC_HTTP_URL
value: http://op-geth:8545/
value: http://op-node:8545/
- name: ETHEREUM_JSONRPC_TRACE_URL
value: http://op-geth:8545/
value: http://op-node:8545/
- name: ETHEREUM_JSONRPC_VARIANT
value: geth
- name: EXTERNAL_APPS
Expand Down
2 changes: 1 addition & 1 deletion templates/k8s/op-batcher-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
- |
op-batcher \
--l1-eth-rpc=$(L1_RPC) \
--l2-eth-rpc=http://op-geth:8545 \
--l2-eth-rpc=http://op-node:8545 \
--rollup-rpc=http://op-node:8547 \
--poll-interval=1s \
--sub-safety-margin=6 \
Expand Down
22 changes: 0 additions & 22 deletions templates/k8s/op-geth-service.yaml

This file was deleted.

124 changes: 0 additions & 124 deletions templates/k8s/op-geth-sts.yaml

This file was deleted.

17 changes: 15 additions & 2 deletions templates/k8s/op-node-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,24 @@ metadata:
spec:
selector:
name: op-node
type: LoadBalancer
ports:
- protocol: TCP
name: rpc
name: op-geth-httprpc
port: 8545
targetPort: 8545
- protocol: TCP
name: op-geth-wsrpc
port: 8546
targetPort: 8546
- protocol: TCP
name: op-geth-authrpc
port: 8551
targetPort: 8551
- protocol: TCP
name: op-node-rpc
port: 8547
targetPort: 8547
- protocol: TCP
name: p2p
name: op-node-p2p
port: 9003
137 changes: 120 additions & 17 deletions templates/k8s/op-node-sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,118 @@ metadata:
name: op-node
namespace: l2launcher
spec:
replicas: 2
selector:
matchLabels:
name: op-node
serviceName: op-node
replicas: 2
template:
metadata:
labels:
name: op-node
spec:
initContainers:
- name: genesis-deployer
image: ghcr.io/planetarium/mothership-l2launcher-genesis-deployer:latest
env:
- name: L1_RPC
valueFrom:
configMapKeyRef:
name: env-cm
key: L1_RPC
- name: L2_CHAIN_ID
valueFrom:
configMapKeyRef:
name: env-cm
key: L2_CHAIN_ID
- name: ADMIN_KEY
valueFrom:
secretKeyRef:
name: env-secret
key: ADMIN_KEY
- name: BATCHER_KEY
valueFrom:
secretKeyRef:
name: env-secret
key: BATCHER_KEY
- name: PROPOSER_KEY
valueFrom:
secretKeyRef:
name: env-secret
key: PROPOSER_KEY
- name: SEQUENCER_KEY
valueFrom:
secretKeyRef:
name: env-secret
key: SEQUENCER_KEY
volumeMounts:
- mountPath: /data
name: genesis-pvc
- name: genesis-init-predeploy
image: ghcr.io/planetarium/mothership-l2launcher-genesis-init-predeploy:latest
volumeMounts:
- mountPath: /data
name: op-geth-volume
- mountPath: /genesis
name: genesis-pvc
- mountPath: /genesis/predeploy.json
name: predeploy-json-cm
subPath: predeploy.json
readOnly: true
containers:
- args:
- name: op-geth
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101305.0
args:
- --datadir=/data
- --http
- --http.corsdomain=*
- --http.vhosts=*
- --http.addr=0.0.0.0
- --http.api=web3,debug,eth,txpool,net,engine
- --ws
- --ws.addr=0.0.0.0
- --ws.port=8546
- --ws.origins=*
- --ws.api=debug,eth,txpool,net,engine
- --syncmode=full
- --gcmode=archive
- --nodiscover
- --maxpeers=0
- --authrpc.vhosts=*
- --authrpc.addr=0.0.0.0
- --authrpc.port=8551
- --authrpc.jwtsecret=/genesis/jwt.txt
- --rollup.disabletxpoolgossip=true
ports:
- containerPort: 8545
protocol: TCP
- containerPort: 8546
protocol: TCP
- containerPort: 8551
protocol: TCP
volumeMounts:
- mountPath: /data
name: op-geth-volume
- mountPath: /genesis
name: genesis-pvc
readOnly: true
livenessProbe:
exec:
command:
- nc
- -z
- localhost
- "8545"
periodSeconds: 5
- name: op-node
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.4.2
command:
- sh
- -c
args:
- |
op-node \
--l2=http://op-geth:8551 \
--l2=http://localhost:8551 \
--l2.jwt-secret=/genesis/jwt.txt \
--sequencer.enabled \
--sequencer.l1-confs=3 \
Expand All @@ -32,9 +130,6 @@ spec:
--l1=$(L1_RPC) \
--l1.rpckind=any \
--log.level=debug
command:
- sh
- -c
env:
- name: L1_RPC
valueFrom:
Expand All @@ -46,16 +141,6 @@ spec:
secretKeyRef:
name: env-secret
key: SEQUENCER_KEY
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.4.2
livenessProbe:
exec:
command:
- nc
- -z
- localhost
- "8547"
periodSeconds: 5
name: op-node
ports:
- containerPort: 8547
protocol: TCP
Expand All @@ -67,12 +152,30 @@ spec:
- mountPath: /genesis
name: genesis-pvc
readOnly: true
livenessProbe:
exec:
command:
- nc
- -z
- localhost
- "8547"
periodSeconds: 5
volumes:
- name: genesis-pvc
persistentVolumeClaim:
claimName: genesis-pvc
readOnly: true
- name: predeploy-json-cm
configMap:
name: predeploy-json-cm
volumeClaimTemplates:
- metadata:
name: op-geth-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
- metadata:
name: op-node-volume
spec:
Expand Down

0 comments on commit 4086b39

Please sign in to comment.