Skip to content

Commit

Permalink
Merge pull request #1720 from planetarium/mothership/extraArgs
Browse files Browse the repository at this point in the history
Add extraArgs to opGeth
  • Loading branch information
sky1045 authored May 30, 2024
2 parents 1e1b574 + 40d7048 commit c100765
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 23 deletions.
23 changes: 3 additions & 20 deletions charts/mothership/templates/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,6 @@ spec:
securityContext:
runAsUser: 0
runAsNonRoot: false
{{- if $.Values.genesis.createSnapshot }}
- name: create-snapshot
image: alpine:3.19
command: ["sh", "-c"]
args:
- |
apk add zstd aws-cli ; \
TIME=`date -u +%Y%m%dT%H%M%SZ` ; \
tar cvf - chaindata -C /data/geth | zstd - -f -o /data/snapshot-$TIME.tar.zst ; \
aws s3 cp /data/snapshot-$TIME.tar.zst s3://$S3_SNAPSHOT_PATH/snapshot-$TIME.tar.zst --acl public-read
env:
- name: S3_SNAPSHOT_PATH
value: "{{ $.Values.genesis.s3SnapshotPath }}"
volumeMounts:
- mountPath: /data
name: op-geth-volume
securityContext:
runAsUser: 0
runAsNonRoot: false
{{- end }}
{{- if $.Values.genesis.snapshot }}
- name: fetch-snapshot
image: curlimages/curl
Expand Down Expand Up @@ -148,6 +128,9 @@ spec:
- --rollup.disabletxpoolgossip=true
- --syncmode=full
- --gcmode=archive
{{- with $.Values.node.opGeth.extraArgs }}
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: op-geth-rpc
containerPort: {{ $.Values.node.opGeth.port.rpc }}
Expand Down
2 changes: 2 additions & 0 deletions charts/mothership/templates/snapshot-storage.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.genesis.createSnapshot }}
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
Expand All @@ -10,3 +11,4 @@ parameters:
provisioner: ebs.csi.aws.com
reclaimPolicy: Delete
allowVolumeExpansion: true
{{- end }}
2 changes: 2 additions & 0 deletions charts/mothership/templates/snapshot-workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.genesis.createSnapshot }}
apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
Expand Down Expand Up @@ -305,3 +306,4 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/mothership/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ externalSecret:
genesis:
createSnapshot: false
snapshot: ""
s3SnapshotPath: ""
volume:
storage: 100Mi

Expand All @@ -30,6 +31,7 @@ node:
udp: 30303
volume: &op-geth-volume
storage: 100Gi
extraArgs: []
opNode:
image: &op-node-image us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.7.5
port: &op-node-port
Expand Down
2 changes: 1 addition & 1 deletion mothership/holesky-devnet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ awsLoadBalancerSslCert: arn:aws:acm:us-east-2:319679068466:certificate/dbb84b9a-

genesis:
source: https://mothership-devnet-holesky-genesis.s3.us-east-2.amazonaws.com
createSnapshot: false
createSnapshot: true
s3SnapshotPath: mothership-devnet-holesky-genesis/snapshot

blockscout:
Expand Down
4 changes: 2 additions & 2 deletions mothership/holesky-testnet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ awsLoadBalancerSslCert: arn:aws:acm:us-east-2:319679068466:certificate/dbb84b9a-

genesis:
source: https://mothership-devnet-holesky-genesis.s3.us-east-2.amazonaws.com/testnet
createSnapshot: false
s3SnapshotPath: ""
createSnapshot: true
s3SnapshotPath: "mothership-devnet-holesky-genesis/testnet/snapshot"

blockscout:
loadBalancerExternal: true
Expand Down

0 comments on commit c100765

Please sign in to comment.