-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(charts)!: refactor of evm chart (#995)
## Summary Large refactor of the EVM chart which break out the various components, and restructures the value file to have the genesis clearly defined. The evm chart itself becomes only `geth` * `conductor.` New charts for `composer` & `evm-faucet` are added. A new `evm-stack` chart is created which allows user to run many of these components similar to how EVM chart functioned before, it is migrated to using the blockscout published chart instead of our own chart for blockscout (to be tested still). ## Background The EVM chart needed to be split up for a long time, the blockscout and faucet dependencies mostly useful for local dev. Composer split out helps at scale.
- Loading branch information
Showing
46 changed files
with
1,372 additions
and
990 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,6 +99,10 @@ jobs: | |
with: | ||
python-version: '3.9' | ||
check-latest: true | ||
- name: Setup helm repos | ||
run: | | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm repo add blockscout https://blockscout.github.io/helm-charts | ||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
- name: Run chart-testing (list-changed) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: v2 | ||
name: composer | ||
description: Astria composer helm chart | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.1.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "0.1.0" | ||
|
||
maintainers: | ||
- name: wafflesvonmaple | ||
url: astria.org | ||
- name: quasystaty1 | ||
url: astria.org | ||
- name: joroshiba | ||
url: astria.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{{/* | ||
Namepsace to deploy elements into. | ||
*/}} | ||
{{- define "composer.namespace" -}} | ||
{{- default .Release.Namespace .Values.global.namespaceOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end }} | ||
|
||
{{/* | ||
Single entry of rollup names | ||
*/}} | ||
{{- define "composer.rollupDefinition" }} | ||
{{ .name }}::{{ .wsRpc }} | ||
{{- end}} | ||
|
||
{{/* | ||
Rollup config string | ||
*/}} | ||
{{- define "composer.rollups" }} | ||
{{- range $index, $element := .Values.config.rollups }} | ||
{{- if $index }},{{- end }}{{- tpl (include "composer.rollupDefinition" $element) $ }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- define "composer.image" -}} | ||
{{ .Values.images.composer.repo }}:{{ if .Values.global.dev }}{{ .Values.images.composer.devTag }}{{ else }}{{ .Values.images.composer.tag }}{{ end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: composer-env | ||
namespace: {{ include "composer.namespace" . }} | ||
data: | ||
ASTRIA_COMPOSER_LOG: "astria_composer={{ .Values.config.logLevel }}" | ||
ASTRIA_COMPOSER_API_LISTEN_ADDR: "0.0.0.0:{{ .Values.ports.healthApi }}" | ||
ASTRIA_COMPOSER_GRPC_ADDR: "0.0.0.0:{{ .Values.ports.grpc }}" | ||
ASTRIA_COMPOSER_SEQUENCER_CHAIN_ID: "{{ tpl .Values.config.sequencerChainId . }}" | ||
ASTRIA_COMPOSER_SEQUENCER_URL: "{{ tpl .Values.config.sequencerRpc . }}" | ||
ASTRIA_COMPOSER_ROLLUPS: "{{ include "composer.rollups" . }}" | ||
ASTRIA_COMPOSER_PRIVATE_KEY_FILE: "/var/secrets/{{ .Values.config.privateKey.secret.filename }}" | ||
ASTRIA_COMPOSER_MAX_BYTES_PER_BUNDLE: "{{ .Values.config.maxBytesPerBundle }}" | ||
ASTRIA_COMPOSER_BUNDLE_QUEUE_CAPACITY: "{{ .Values.config.bundleQueueCapacity }}" | ||
ASTRIA_COMPOSER_MAX_SUBMIT_INTERVAL_MS: "{{ .Values.config.maxSubmitInterval }}" | ||
ASTRIA_COMPOSER_SEQUENCER_ADDRESS_PREFIX: "{{ .Values.config.sequencerAddressPrefix}}" | ||
ASTRIA_COMPOSER_FEE_ASSET: "{{ .Values.config.sequencerNativeAssetBaseDenomination }}" | ||
ASTRIA_COMPOSER_NO_METRICS: "{{ not .Values.metrics.enabled }}" | ||
ASTRIA_COMPOSER_METRICS_HTTP_LISTENER_ADDR: "0.0.0.0:{{ .Values.ports.metrics }}" | ||
ASTRIA_COMPOSER_FORCE_STDOUT: "{{ .Values.global.useTTY }}" | ||
ASTRIA_COMPOSER_PRETTY_PRINT: "{{ .Values.global.useTTY }}" | ||
NO_COLOR: "{{ .Values.global.useTTY }}" | ||
ASTRIA_COMPOSER_NO_OTEL: "{{ not .Values.otel.enabled }}" | ||
OTEL_EXPORTER_OTLP_ENDPOINT: "{{ tpl .Values.otel.endpoint . }}" | ||
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "{{ tpl .Values.otel.tracesEndpoint . }}" | ||
OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: "{{ tpl .Values.otel.tracesTimeout . }}" | ||
OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: "{{ tpl .Values.otel.tracesCompression . }}" | ||
OTEL_EXPORTER_OTLP_HEADERS: "{{ tpl .Values.otel.otlpHeaders . }}" | ||
OTEL_EXPORTER_OTLP_TRACE_HEADERS: "{{ tpl .Values.otel.traceHeaders . }}" | ||
OTEL_SERVICE_NAME: "{{ tpl .Values.otel.serviceName . }}" | ||
{{- if not .Values.global.dev }} | ||
{{- else }} | ||
{{- end }} | ||
--- | ||
{{- if not .Values.secretProvider.enabled }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
namespace: {{ include "composer.namespace" . }} | ||
name: sequencer-private-key | ||
data: | ||
{{ .Values.config.privateKey.secret.filename }}: | | ||
{{ .Values.config.privateKey.devContent }} | ||
--- | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: composer | ||
namespace: {{ include "composer.namespace" . }} | ||
labels: | ||
app: composer | ||
spec: | ||
replicas: {{ .Values.global.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app: composer | ||
template: | ||
metadata: | ||
labels: | ||
app: composer | ||
spec: | ||
containers: | ||
- name: composer | ||
image: {{ include "composer.image" . }} | ||
command: ["/usr/local/bin/astria-composer"] | ||
stdin: {{ .Values.global.useTTY }} | ||
tty: {{ .Values.global.useTTY }} | ||
envFrom: | ||
- configMapRef: | ||
name: composer-env | ||
volumeMounts: | ||
- mountPath: "/var/secrets" | ||
name: sequencer-private-key | ||
startupProbe: | ||
httpGet: | ||
path: /readyz | ||
port: {{ .Values.ports.healthApi }} | ||
readinessProbe: | ||
httpGet: | ||
path: /readyz | ||
port: {{ .Values.ports.healthApi }} | ||
ports: | ||
{{- if .Values.metrics.enabled }} | ||
- containerPort: {{ .Values.ports.metrics }} | ||
name: metrics | ||
{{- end }} | ||
- containerPort: {{ .Values.ports.healthApi }} | ||
name: health-api | ||
- containerPort: {{ .Values.ports.grpc }} | ||
name: grpc | ||
resources: | ||
{{- toYaml .Values.resources | trim | nindent 12 }} | ||
volumes: | ||
- name: sequencer-private-key | ||
{{- if .Values.secretProvider.enabled }} | ||
csi: | ||
driver: secrets-store.csi.k8s.io | ||
readOnly: true | ||
volumeAttributes: | ||
secretProviderClass: sequencer-private-key | ||
{{- else }} | ||
configMap: | ||
name: sequencer-private-key | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
{{- if .Values.secretProvider.enabled }} | ||
apiVersion: secrets-store.csi.x-k8s.io/v1 | ||
kind: SecretProviderClass | ||
metadata: | ||
name: sequencer-private-key | ||
spec: | ||
provider: {{ .Values.secretProvider.provider }} | ||
parameters: | ||
{{- $_ := set $ "key" .Values.config.privateKey.secret }} | ||
{{- tpl $.Values.secretProvider.parametersTemplate $ | nindent 4 }} | ||
--- | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: composer-service | ||
namespace: {{ include "composer.namespace" . }} | ||
spec: | ||
selector: | ||
app: composer | ||
ports: | ||
- name: grpc | ||
port: {{ .Values.ports.grpc }} | ||
targetPort: grpc | ||
--- | ||
{{- if .Values.metrics.enabled }} | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: metrics | ||
namespace: {{ include "composer.namespace" . }} | ||
labels: | ||
app: composer | ||
spec: | ||
selector: | ||
app: composer | ||
ports: | ||
- name: metrics | ||
port: {{ .Values.ports.metrics }} | ||
targetPort: geth-metr | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{{- if .Values.serviceMonitor.enabled }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: composer-metrics | ||
labels: | ||
{{- with .Values.serviceMonitor.additionalLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
jobLabel: composer-metrics | ||
namespaceSelector: | ||
matchNames: | ||
- {{ include "composer.namespace" . }} | ||
selector: | ||
matchLabels: | ||
app: composer | ||
endpoints: | ||
- port: metrics | ||
path: / | ||
{{- with .Values.serviceMonitor.interval }} | ||
interval: {{ . }} | ||
{{- end }} | ||
{{- with .Values.serviceMonitor.scrapeTimeout }} | ||
scrapeTimeout: {{ . }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
global: | ||
namespaceOverride: "" | ||
replicaCount: 1 | ||
# Whether to use tty readable logging for astria services, when false use json. | ||
useTTY: false | ||
dev: false | ||
|
||
images: | ||
composer: | ||
repo: ghcr.io/astriaorg/composer | ||
tag: "0.8.0" | ||
devTag: latest | ||
|
||
config: | ||
logLevel: "debug" | ||
maxBytesPerBundle: 200000 | ||
bundleQueueCapacity: 40000 | ||
maxSubmitInterval: 2000 | ||
sequencerAddressPrefix: astria | ||
sequencerNativeAssetBaseDenomination: "nria" | ||
sequencerRpc: "" | ||
sequencerChainId: "" | ||
privateKey: | ||
devContent: "" | ||
secret: | ||
filename: "key.hex" | ||
resourceName: "projects/$PROJECT_ID/secrets/sequencerPrivateKey/versions/latest" | ||
rollups: | ||
- name: "astria" | ||
wsRpc: "ws://" | ||
|
||
otel: | ||
enabled: false | ||
serviceName: "composer" | ||
endpoint: "" | ||
tracesEndpoint: "" | ||
tracesCompression: "gzip" | ||
tracesTimeout: "10" | ||
otlpHeaders: "" | ||
traceHeaders: "" | ||
|
||
metrics: | ||
enabled: false | ||
|
||
serviceMonitor: | ||
# set to enable port svc and service monitor | ||
enabled: false | ||
port: 6060 | ||
additionalLabels: | ||
release: kube-prometheus-stack | ||
|
||
# When deploying in a production environment should use a secret provider | ||
# This is configured for use with GCP, need to set own resource names | ||
# and keys | ||
secretProvider: | ||
enabled: false | ||
provider: gcp | ||
parametersTemplate: |- | ||
secrets: | | ||
- resourceName: {{ .key.resourceName }} | ||
fileName: "{{ .key.filename }}" | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 100Mi | ||
limits: | ||
cpu: 1000m | ||
memory: 1Gi | ||
|
||
# Default service ports | ||
ports: | ||
grpc: 50052 | ||
healthApi: 2450 | ||
metrics: 6060 |
Oops, something went wrong.