diff --git a/charts/sequencer/files/cometbft/config/config.toml b/charts/sequencer/files/cometbft/config/config.toml index 8adb47d7..886aae0c 100644 --- a/charts/sequencer/files/cometbft/config/config.toml +++ b/charts/sequencer/files/cometbft/config/config.toml @@ -15,7 +15,7 @@ proxy_app = "tcp://127.0.0.1:{{ .Values.ports.sequencerABCI }}" # A custom human readable name for this node -moniker = "{{ .Values.config.cometBFT.moniker }}" +moniker = "{{ .Values.config.moniker }}" # If this node is many blocks behind the tip of the chain, BlockSync # allows them to catchup quickly by downloading blocks in parallel diff --git a/charts/sequencer/templates/configmaps.yaml b/charts/sequencer/templates/configmaps.yaml index a5e15475..321a51f2 100644 --- a/charts/sequencer/templates/configmaps.yaml +++ b/charts/sequencer/templates/configmaps.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: cometbft-config + name: {{ .Values.config.moniker }}-cometbft-config namespace: {{ .Values.namespace }} data: genesis.json: | @@ -16,7 +16,7 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: cometbft-data + name: {{ .Values.config.moniker }}-cometbft-data namespace: {{ .Values.namespace }} data: priv_validator_state.json: | @@ -25,7 +25,7 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: cometbft-env + name: {{ .Values.config.moniker }}-cometbft-env namespace: {{ .Values.namespace }} data: COMET_BFT_RPC_PORT: "{{ .Values.ports.cometBFTRPC }}" @@ -33,7 +33,7 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: sequencer-env + name: {{ .Values.config.moniker }}-sequencer-env namespace: {{ .Values.namespace }} data: ASTRIA_SEQUENCER_LOG: "astria_sequencer=debug" @@ -45,7 +45,7 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: relayer-env + name: {{ .Values.config.moniker }}-relayer-env namespace: {{ .Values.namespace }} data: ASTRIA_SEQUENCER_RELAYER_LOG: "astria_sequencer_relayer=debug" @@ -59,7 +59,7 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: relayer-scripts + name: {{ .Values.config.moniker }}-relayer-scripts namespace: {{ .Values.namespace }} data: start-relayer.sh: | diff --git a/charts/sequencer/templates/deployment.yaml b/charts/sequencer/templates/deployment.yaml index 4d1bec03..a04811d8 100644 --- a/charts/sequencer/templates/deployment.yaml +++ b/charts/sequencer/templates/deployment.yaml @@ -3,20 +3,20 @@ kind: Deployment metadata: name: sequencer labels: - app: astria-dev-cluster + app: {{ .Values.config.moniker }}-sequencer namespace: {{ .Values.namespace }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - app: astria-dev-cluster + app: {{ .Values.config.moniker }}-sequencer template: metadata: annotations: cni.projectcalico.org/ipAddrs: '[ "{{ .Values.config.calicoIP }}" ]' name: astria-sequencer labels: - app: astria-dev-cluster + app: {{ .Values.config.moniker }}-sequencer spec: initContainers: - command: [ "/bin/sh", "-c" ] @@ -40,7 +40,7 @@ spec: tty: {{ .Values.config.useTTY }} envFrom: - configMapRef: - name: sequencer-env + name: {{ .Values.config.moniker }}-sequencer-env volumeMounts: - mountPath: /sequencer name: sequencer-shared-storage-vol @@ -56,7 +56,7 @@ spec: image: "{{ .Values.images.cometBFT }}" envFrom: - configMapRef: - name: cometbft-env + name: {{ .Values.config.moniker }}-cometbft-env volumeMounts: - mountPath: /cometbft name: sequencer-shared-storage-vol @@ -74,7 +74,7 @@ spec: tty: {{ .Values.config.useTTY }} envFrom: - configMapRef: - name: relayer-env + name: {{ .Values.config.moniker }}-relayer-env volumeMounts: - mountPath: /home/relayer name: sequencer-shared-storage-vol @@ -89,22 +89,22 @@ spec: volumes: - name: cometbft-config-volume configMap: - name: cometbft-config + name: {{ .Values.config.moniker }}-cometbft-config defaultMode: 0700 - name: cometbft-data-volume configMap: - name: cometbft-data + name: {{ .Values.config.moniker }}-cometbft-data defaultMode: 0700 {{- if .Values.config.relayer.enabled }} - name: relayer-scripts-volume configMap: - name: relayer-scripts + name: {{ .Values.config.moniker }}-relayer-scripts defaultMode: 0500 {{- end }} - name: sequencer-shared-storage-vol {{- if .Values.storage.enabled }} persistentVolumeClaim: - claimName: sequencer-shared-storage-pvc + claimName: {{ .Values.config.moniker }}-sequencer-shared-storage-pvc {{- else }} emptyDir: {} {{- end }} diff --git a/charts/sequencer/templates/ingress.yaml b/charts/sequencer/templates/ingress.yaml index 71297063..2a898d7b 100644 --- a/charts/sequencer/templates/ingress.yaml +++ b/charts/sequencer/templates/ingress.yaml @@ -10,7 +10,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: sequencer-ingress + name: {{ .Values.config.moniker }}-sequencer-ingress namespace: {{ .Values.namespace }} labels: {{- with .Values.ingress.labels }} @@ -66,7 +66,7 @@ spec: pathType: Prefix backend: service: - name: sequencer-service + name: {{ .Values.config.moniker }}-sequencer-service port: name: cometbft-rpc {{- end -}} diff --git a/charts/sequencer/templates/service.yaml b/charts/sequencer/templates/service.yaml index 44eeb9ac..5dc7abf3 100644 --- a/charts/sequencer/templates/service.yaml +++ b/charts/sequencer/templates/service.yaml @@ -1,12 +1,15 @@ kind: Service apiVersion: v1 metadata: - name: sequencer-service + name: {{ .Values.config.moniker }}-sequencer-service namespace: {{ .Values.namespace }} spec: selector: - app: astria-dev-cluster + app: {{ .Values.config.moniker }}-sequencer ports: - name: cometbft-rpc port: {{ .Values.ports.cometBFTRPC }} targetPort: cometbft-rpc + - name: cometbft-p2p + port: {{ .Values.ports.cometBFTP2P }} + name: cometbft-p2p diff --git a/charts/sequencer/templates/storageclasses.yaml b/charts/sequencer/templates/storageclasses.yaml index 9f851d73..60bdb190 100644 --- a/charts/sequencer/templates/storageclasses.yaml +++ b/charts/sequencer/templates/storageclasses.yaml @@ -5,7 +5,7 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: - name: {{ $value.persistentVolumeName }}-local + name: {{ $.Values.config.moniker }}-{{ $value.persistentVolumeName }}-local provisioner: kubernetes.io/no-provisioner volumeBindingMode: WaitForFirstConsumer reclaimPolicy: Retain diff --git a/charts/sequencer/templates/volumes.yaml b/charts/sequencer/templates/volumes.yaml index a180dc99..d32e2333 100644 --- a/charts/sequencer/templates/volumes.yaml +++ b/charts/sequencer/templates/volumes.yaml @@ -6,7 +6,7 @@ apiVersion: v1 kind: PersistentVolume metadata: - name: {{ $value.persistentVolumeName }}-pv + name: {{ $.Values.config.moniker }}-{{ $value.persistentVolumeName }}-pv spec: capacity: storage: {{ $value.size }} diff --git a/charts/sequencer/values.yaml b/charts/sequencer/values.yaml index d66f261e..e5590f26 100644 --- a/charts/sequencer/values.yaml +++ b/charts/sequencer/values.yaml @@ -6,6 +6,7 @@ namespace: "astria-dev-cluster" replicaCount: 1 config: + moniker: "node0" calicoIP: "192.168.65.120" # Whether to use tty readable logging for astria services, when false use json. # Best to be false in production environments, true for clean logs on local dev. @@ -31,7 +32,7 @@ config: # Values for CometBFT node configuration cometBFT: chainId: 'sequencer-test-chain' - moniker: 'node0' + # If using postgres for indexing, update to enabled and set the connection psql: enabled: false diff --git a/validator-values/node0.yml b/validator-values/node0.yml index a781124f..a70d1bb7 100644 --- a/validator-values/node0.yml +++ b/validator-values/node0.yml @@ -1,10 +1,10 @@ # Override value example for second validator from main chart config: + moniker: 'node0' calicoIP: "192.168.65.120" # Values for CometBFT node configuration cometBFT: - moniker: 'node0' privNodeKey: HGWRtLbV8WLGFgbYhaGyaLe++DC+DBoc7O3bri81vs2ZlpR28IFfQScoO1aNOE/ygs8LIPM9UzLzbaab4VMggQ== p2p: # Address to advertise to peers for them to dial. If empty, will use the same diff --git a/validator-values/node1.yml b/validator-values/node1.yml index 96605f2c..29afa03c 100644 --- a/validator-values/node1.yml +++ b/validator-values/node1.yml @@ -2,11 +2,11 @@ namespace: astria-validator-node1 config: + moniker: 'node1' calicoIP: "192.168.65.121" # Values for CometBFT node configuration cometBFT: - moniker: 'node1' privNodeKey: YhbLhsKYUexcVOPBHUS6nNy7AOjVX0DxvIQW0mZBHwjbGbIgGlfuzuswG+uetk5zhPHYZMMCz77fa5/B/KP0lw== p2p: # Address to advertise to peers for them to dial. If empty, will use the same diff --git a/validator-values/node2.yml b/validator-values/node2.yml index 54ccc6d2..ee82007f 100644 --- a/validator-values/node2.yml +++ b/validator-values/node2.yml @@ -2,11 +2,11 @@ namespace: astria-validator-node2 config: + moniker: 'node2' calicoIP: "192.168.65.122" # Values for CometBFT node configuration cometBFT: - moniker: 'node2' privNodeKey: 1yh4XrMHn75sSW5cOhGDTVgv5BbqXlhrLduxHcE2t1osbwKQzo7xlvSK1vh5CVDvHESPYK/56uTKXM/1ifqHbw== p2p: # Address to advertise to peers for them to dial. If empty, will use the same