Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
selectors & labels
Browse files Browse the repository at this point in the history
  • Loading branch information
joroshiba committed Oct 31, 2023
1 parent a3d487d commit e6c4938
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 27 deletions.
2 changes: 1 addition & 1 deletion charts/sequencer/files/cometbft/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions charts/sequencer/templates/configmaps.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: cometbft-config
name: {{ .Values.config.moniker }}-cometbft-config
namespace: {{ .Values.namespace }}
data:
genesis.json: |
Expand All @@ -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: |
Expand All @@ -25,15 +25,15 @@ 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 }}"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: sequencer-env
name: {{ .Values.config.moniker }}-sequencer-env
namespace: {{ .Values.namespace }}
data:
ASTRIA_SEQUENCER_LOG: "astria_sequencer=debug"
Expand All @@ -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"
Expand All @@ -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: |
Expand Down
20 changes: 10 additions & 10 deletions charts/sequencer/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 }}
4 changes: 2 additions & 2 deletions charts/sequencer/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -66,7 +66,7 @@ spec:
pathType: Prefix
backend:
service:
name: sequencer-service
name: {{ .Values.config.moniker }}-sequencer-service
port:
name: cometbft-rpc
{{- end -}}
Expand Down
7 changes: 5 additions & 2 deletions charts/sequencer/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion charts/sequencer/templates/storageclasses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/sequencer/templates/volumes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
3 changes: 2 additions & 1 deletion charts/sequencer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion validator-values/node0.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion validator-values/node1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion validator-values/node2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e6c4938

Please sign in to comment.