Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vldastar committed Nov 12, 2024
1 parent 94d6d6b commit c36947f
Show file tree
Hide file tree
Showing 8 changed files with 335 additions and 91 deletions.
73 changes: 73 additions & 0 deletions charts/Deploy.md.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#! if sequencer, then
#! 0.
# genesisURL - in chain.yaml
# rollup.json - in chain.yaml
#! 1. NodePort
# opGethAdvertiseTcpPort: 32201 - in values
# opNodeAdvertiseTcpPort: 32221 - in values
#? netRestrictCIDR: 10.0.0.0/8 ?? - in values
#! 2. Only the sequencers are the peers
# sequencersOpGethAddresses: [] - in chain.yaml
# sequencersOpNodeAddresses: [] - in chain.yaml
#! 3. ExternalSecrets
# externalSecretRoleARN - in `environment.yaml` ?? naming convention
# sequencerOpNodeP2PKeySecretName - $chainName-$Namespace dev-hari-sequencer-1-opnode-p2p
# sequencerOpGethP2PKeySecretName - $chainName-$Namespace dev-hari-sequencer-1-opgeth-p2p
# sequencerPrivateKeySecretName - $chainName-$Namespace dev-hari-sequencers-private-key
#! 4. Internal ingress
# securityGroup - in `environment.yaml`
# accessLogsS3 - in `environment.yaml`
# internalDnsZone - in `environment.yaml`
#! 5. replicas =1
sources:
- repoURL: https://github.com/Soneium/soneium-infra-gitops.git
path: "{{.path.path}}"
targetRevision: stg-infra
helm:
parameters:
- name: environment
value: dev-hari
valuesObject:
#* {{ tpl (printf "values/%s" $valuesFile | $.Files.Get) $ | indent 10 }}
#* sequencer.yaml
sequencer: true
opGethAdvertiseTcpPort: 32201
opNodeAdvertiseTcpPort: 32221
netRestrictCIDR: 10.0.0.0/8

externalSecretRoleARN: {{(get .Values .cluster.argoCluster).sequencer-1.externalSecretRoleARN}}
securityGroup: {{(get .Values .cluster.argoCluster).securityGroup}}
accessLogsS3: {{(get .Values .cluster.argoCluster).accessLogsS3}}
internalDnsZone: {{(get .Values .cluster.argoCluster).internalDnsZone}}




# The AWS region for the kubernetes cluster. Set to use KIAM or kube2iam for example.
region: {{(get .Values .cluster.argoCluster).eksRegion}}

valueFiles:
- $values/$ENV/chain.yaml
- $values/$ENV/environment.yaml
- repoURL: https://github.com/Soneium/soneium-infra-gitops.git
targetRevision: stg-infra
ref: values




#! If Peer
#! 1. LoadBalancer service
# nlbSubnetPrefix: subnets preffix - in `environment.yaml`
# eip list - in `environment.yaml`
# securityGroup - in `environment.yaml`
#! 2. Sequencer URL ??? any or active ???
# sequencer rpc URL (only if snap ???)
#! 3. ExternalSecrets
# extSecretRoleARN - can get secrets of any peer
# p2pKeySecretPrefix - just chain name (dev-hari-....)
#? 4. Ingress
# securityGroup - in `environment.yaml`
# accessLogsS3 - in `environment.yaml`
#? internalDnsZone - in `environment.yaml`
#! 5. replicas >1
59 changes: 59 additions & 0 deletions charts/hari-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#* L1 connection
l1RpcUrl: https://sepolia-execution.dev.hypersonicl2.com
l1BeaconUrl: https://sepolia-beacon.dev.hypersonicl2.com
l1RpcKind: any

#* Chain definition
genesisUrl: https://shared-assets.astar.network/files/tools/tmp/hari/genesis.json
l2NetworkId: "8745126"
rollup.json: |
{
"genesis": {
"l1": {
"hash": "0x9c2b802c06c3ddd448f4b622a1743d6920a4fd6ce6b81fabe7de281aa241890f",
"number": 6975613
},
"l2": {
"hash": "0xf3d7134f24d92265902ef529ba9953fe247a42fc44c308a6ca5b5c241301e4c7",
"number": 0
},
"l2_time": 1730278668,
"system_config": {
"batcherAddr": "0xde626d10edea9d4fadb787d999d01c568e4e27fa",
"overhead": "0x00000000000000000000000000000000000000000000000000000000000000bc",
"scalar": "0x00000000000000000000000000000000000000000000000000000000000a6fe0",
"gasLimit": 30000000
}
},
"block_time": 2,
"max_sequencer_drift": 1800,
"seq_window_size": 3600,
"channel_timeout": 300,
"l1_chain_id": 11155111,
"l2_chain_id": 8745126,
"regolith_time": 0,
"canyon_time": 0,
"delta_time": 0,
"ecotone_time": 0,
"batch_inbox_address": "0x002b8c9f5613113ce88307a950922aedef77928e",
"deposit_contract_address": "0x74b46e5ba71652a61339fb08befa12c4f0e093f2",
"l1_system_config_address": "0xd22b89326b2bf532aa4252f751bb139bb526a3a0",
"protocol_versions_address": "0x0000000000000000000000000000000000000000"
}
# #* Secrets and external secret role
# saExternalSecretRole: arn:aws:iam::239376465783:role/dev-hari-eks-seq-external-secret
#* LB configuration
internalDnsZone: hari.dev.hypersonicl2.internal

#* P2P configuration
sequencerOpGethAddresses:
- enode://df502c2b2d1672a26180f8d53441497ff8e38913b974288a9a9388dc8b1bf90f7b386662ff5013512448eae44085604d44729cabe6143f379c324a9bf1e18b0b@seq-1.hari.dev.hypersonicl2.internal:32201
- enode://b79ecf81c88536cae795b6bdaf0969fb0a1c583ad437f0930ded3a5e3b76a80e4eb807f24bcad1024ebf4cd0b8dc9861e44274d5bb3dcc8365a55e1cf0a4286d@seq-2.hari.dev.hypersonicl2.internal:32202
- enode://222ecf81c88536cae795b6bdaf0969fb0a1c583ad437f0930ded3a5e3b76a80e4eb807f24bcad1024ebf4cd0b8dc9861e44274d5bb3dcc8365a55e1cf0a4286d@seq-3.hari.dev.hypersonicl2.internal:32203

sequencerOpNodeAddresses:
- /dns4/seq-1.hari.dev.hypersonicl2.internal/tcp/32221/p2p/16Uiu2HAkvPrtNaazRNdr1zYqJGkS8m6VXYY7Z6Z6dxVYQtegpwXT
- /dns4/seq-2.hari.dev.hypersonicl2.internal/tcp/32222/p2p/16Uiu2HAmRCJHftQFzmK2FjpDkk73uNPeiRjkXMrRH5JTwX9JnwVi
- /dns4/seq-3.hari.dev.hypersonicl2.internal/tcp/32222/p2p/16Uiu2HAuuuJHftQFzmK2FjpDkk73uNPeiRjkXMrRH5JTwX9JnwDD
3 changes: 1 addition & 2 deletions charts/opnode/templates/additional-manifests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{ range .Values.additionalManifests }}
---
{{ tpl (toYaml .) $ }}
{{ end }}
---
{{ tpl .Values.additionalYamlManifests $ }}
{{ end }}
53 changes: 53 additions & 0 deletions charts/opnode/templates/service-headless.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "opnode.fullname" . }}
labels:
{{- include "opnode.labels" . | nindent 4 }}
spec:
selector:
{{- include "opnode.selectorLabels" . | nindent 4 }}
type: ClusterIP
clusterIP: None
publishNotReadyAddresses: true
ports:
- name: opgeth-rpc
targetPort: opgeth-
port: 8545
protocol: TCP
- name: opgeth-ws
targetPort: opgeth-ws
port: 8546
protocol: TCP
- name: opgeth-p2p
targetPort: http
port: 30303
protocol: TCP
- name: opnode-metrics
targetPort: http
port: 7300
protocol: TCP

- name: opgeth-discovery
targetPort: http
port: 30304
protocol: UDP

- name: opnode-rpc
targetPort: opnode-rpc
port: 9545
protocol: TCP
- name: opnode-p2p
targetPort: http
port: 9222
protocol: TCP
- name: opnode-metrics
targetPort: http
port: 7301
protocol: TCP

- name: opnode-discovery
targetPort: http
port: 9223
protocol: UDP

27 changes: 27 additions & 0 deletions charts/opnode/templates/service-p2p.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "opnode.fullname" . }}
labels:
{{- include "opnode.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: 30303
targetPort: opgeth-p2p
protocol: TCP
name: opgeth-p2p
- port: 30304
targetPort: opgeth-discovery
protocol: TCP
name: opgeth-discovery
- port: 30303
targetPort: opnode-p2p
protocol: TCP
name: opnode-p2p
- port: 30304
targetPort: opnode-discovery
protocol: TCP
name: opnode-discovery
selector:
{{- include "opnode.selectorLabels" . | nindent 4 }}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ metadata:
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
- port: 8545
targetPort: opgeth-rpc
protocol: TCP
name: http
name: opgeth-rpc
- port: 8546
targetPort: opgeth-rpc
protocol: TCP
name: opgeth-rpc
- port: 9545
targetPort: opnode-rpc
protocol: TCP
name: opnode-rpc
selector:
{{- include "opnode.selectorLabels" . | nindent 4 }}
Loading

0 comments on commit c36947f

Please sign in to comment.