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

Commit

Permalink
Merge branch 'main' into gh-pages
Browse files Browse the repository at this point in the history
* main:
  Update images for conductor, composer (#114)
  fix(just): just commands didn't work after chart reorg (#113)
  init lint, set base maintainer (#111)
  fix ingress host tpl (#112)
  set entire ingress spec to configurable var (#109)
  • Loading branch information
steezeburger committed Oct 16, 2023
2 parents 9d23122 + b067ad7 commit b7496c5
Show file tree
Hide file tree
Showing 59 changed files with 532 additions and 88 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Lint and Test Charts

on: pull_request

jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.12.1

- uses: actions/setup-python@v4
with:
python-version: '3.9'
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.4.0

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ 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.2.0
version: 0.2.1

# 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: "1.16.0"

maintainers:
- name: wafflesvonmaple
url: astria.org
- name: steezeburger
url: astria.org
- name: joroshiba
url: astria.org
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,3 @@ ports:
celestiaTokenService: 5353
bridgeRPC: 26658
bridgeHTTP: 26659


File renamed without changes.
12 changes: 10 additions & 2 deletions helm/rollup/Chart.yaml → charts/rollup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ 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.3.1
version: 0.4.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.3.0"
appVersion: "0.4.0"

maintainers:
- name: wafflesvonmaple
url: astria.org
- name: steezeburger
url: astria.org
- name: joroshiba
url: astria.org
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -o errexit -o nounset -o pipefail

# Request Celestia token if connecting to celestia
BEARER_TOKEN=""
if [ "$ASTRIA_CONDUCTOR_DISABLE_FINALIZATION" = "false" ]; then
if [ "$ASTRIA_CONDUCTOR_EXECUTION_COMMIT_LEVEL" != "SoftOnly" ]; then
BEARER_TOKEN=$(wget -qO- http://celestia-service:5353)

if [ -z "$BEARER_TOKEN" ]; then
Expand Down
32 changes: 32 additions & 0 deletions charts/rollup/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{/*
Return if ingress is stable.
*/}}
{{- define "rollup.ingress.isStable" -}}
{{- eq (include "rollup.ingress.apiVersion" .) "networking.k8s.io/v1" }}
{{- end }}

{{/*
Return if ingress supports ingressClassName.
*/}}
{{- define "rollup.ingress.supportsIngressClassName" -}}
{{- or (eq (include "rollup.ingress.isStable" .) "true") (and (eq (include "rollup.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) }}
{{- end }}

{{/*
Return if ingress supports pathType.
*/}}
{{- define "rollup.ingress.supportsPathType" -}}
{{- or (eq (include "rollup.ingress.isStable" .) "true") (and (eq (include "rollup.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) }}
{{- end }}

Return the appropriate apiVersion for ingress.
*/}}
{{- define "rollup.ingress.apiVersion" -}}
{{- if and ($.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" .Capabilities.KubeVersion.Version) }}
{{- print "networking.k8s.io/v1" }}
{{- else if $.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
{{- print "networking.k8s.io/v1beta1" }}
{{- else }}
{{- print "extensions/v1beta1" }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ data:
ASTRIA_CONDUCTOR_CELESTIA_NODE_URL: "{{ .Values.config.celestia.fullNodeUrl }}"
ASTRIA_CONDUCTOR_CHAIN_ID: "{{ .Values.config.rollup.chainId }}"
ASTRIA_CONDUCTOR_EXECUTION_RPC_URL: "http://127.0.0.1:{{ .Values.ports.executionGRPC }}"
ASTRIA_CONDUCTOR_DISABLE_FINALIZATION: "{{ .Values.config.rollup.disableFinalization }}"
ASTRIA_CONDUCTOR_EXECUTION_COMMIT_LEVEL: "{{ .Values.config.rollup.executionCommitLevel }}"
ASTRIA_CONDUCTOR_SEQUENCER_URL: "{{ .Values.config.sequencer.websocket }}"
ASTRIA_CONDUCTOR_DISABLE_EMPTY_BLOCK_EXECUTION: "{{ .Values.config.rollup.skipEmptyBlocks }}"
ASTRIA_CONDUCTOR_INITIAL_SEQUENCER_BLOCK_HEIGHT: "{{ .Values.config.sequencer.initialBlockHeight }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,42 @@
{{- if .Values.ingress.enabled -}}
{{- $ingressApiIsStable := eq (include "rollup.ingress.isStable" .) "true" -}}
{{- $ingressSupportsIngressClassName := eq (include "rollup.ingress.supportsIngressClassName" .) "true" -}}
{{- $ingressSupportsPathType := eq (include "rollup.ingress.supportsPathType" .) "true" -}}
{{- $ingressPathType := .Values.ingress.pathType -}}
{{- $extraPaths := .Values.ingress.extraPaths -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Values.config.rollup.name }}-ingress
namespace: {{ .Values.namespace }}
labels:
{{- with .Values.ingress.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.ingress.annotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ tpl $value $ | quote }}
{{- end }}
{{- end }}
spec:
{{- if and $ingressSupportsIngressClassName .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName }}
{{- end -}}
{{- with .Values.ingress.defaultBackend }}
defaultBackend:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
rules:
{{- if .Values.ingress.hosts }}
{{- with .Values.ingress.hosts }}
{{- tpl (toYaml .) $ | nindent 6 }}
{{- end }}
{{- with .Values.ingress.tls }}
tls:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
{{- else }}
- host: executor.{{ .Values.config.rollup.name }}.localdev.me
http:
paths:
Expand Down Expand Up @@ -45,3 +77,6 @@ spec:
name: {{ .Values.config.rollup.name }}-blockscout-svc
port:
name: blockscout-svc
{{- end -}}
{{- end }}

File renamed without changes.
File renamed without changes.
69 changes: 59 additions & 10 deletions helm/rollup/values.yaml → charts/rollup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ config:
networkId: 912559
# Set to true to have rollup blocks only be generated when there are transactions
skipEmptyBlocks: false
# Set to true to rely on sequencer fully without Celestia DA finalization
disableFinalization: false
# Determines what will drive block execution, options are:
# - "SoftOnly" -> blocks are only pulled from the sequencer
# - "FirmOnly" -> blocks are only pulled from DA
# - "SoftAndFirm" -> blocks are pulled from both the sequencer and DA
executionCommitLevel: 'SoftOnly'
# Definitions around who has funding on startup
genesisAccounts:
- address: "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30"
Expand All @@ -29,7 +32,7 @@ config:
faucet:
# The account from which the faucet disburses funds, likely want to have
# the corresponding account given a balance in genesis accounts.
# Note: When secretProvider.enabled is true the secret provided by
# Note: When secretProvider.enabled is true the secret provided by
# `evmPrivateKey` is used instead of this value.
privateKey: "8b3a7999072c9c9314c084044fe705db11714c6c4ed7cddb64da18ea270dd203"
# The amount of token to give per request
Expand All @@ -39,15 +42,15 @@ config:
sequencer:
# Block height to start syncing rollup from
initialBlockHeight: 1
# Websocket connection used for
# Websocket connection used for
websocket: "ws://sequencer-service:26657/websocket"
# URL path for the sequencer
rpc: "http://sequencer-service:26657"
# Private key which is used for wrapping txs for sequencer submission
# Note: When secretProvider.enabled is true the secret provided by
# Note: When secretProvider.enabled is true the secret provided by
# `sequencerPrivateKey` is used instead of this value.
privateKey: "2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90"

# Configuration for Celestia DA
celestia:
# Full node which client will connect to
Expand All @@ -56,13 +59,13 @@ config:
images:
# Core images for the rollup, developed for Astria
geth: "ghcr.io/astriaorg/go-ethereum:0.3.0"
conductor: "ghcr.io/astriaorg/conductor:0.6.0--conductor"
composer: "ghcr.io/astriaorg/composer:0.2.1--composer"
conductor: "ghcr.io/astriaorg/conductor:0.7.0--conductor"
composer: "ghcr.io/astriaorg/composer:0.2.2--composer"

# Rollup faucet
faucet: "ghcr.io/astriaorg/ria-faucet:0.0.1"

# Pertaining to deploying blockscout block explorer
# Pertaining to deploying blockscout block explorer
blockscout:
core: "docker.io/blockscout/blockscout:5.1.0"
postgres: "docker.io/library/postgres:14"
Expand All @@ -88,7 +91,53 @@ secretProvider:
filename: evmPrivateKey.txt
resourceName: "projects/$PROJECT_ID/secrets/evmPrivateKey/versions/latest"
key: token


ingress:
enabled: true
# For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName
# See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress
# ingressClassName: nginx
# Values can be templated
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
labels: {}
hosts: {}
# - host: executor.example.com
# http:
# paths:
# - path: "/"
# pathType: Prefix
# backend:
# service:
# name: astria-evm-service
# port:
# name: json-rpc-svc
# - host: faucet.example.com
# http:
# paths:
# - path: "/"
# pathType: Prefix
# backend:
# service:
# name: astria-faucet-service
# port:
# name: faucet-svc
# - host: blockscout.example.com
# http:
# paths:
# - path: "/"
# pathType: Prefix
# backend:
# service:
# name: astria-blockscout-svc
# port:
# name: blockscout-svc
tls: {}
# - secretName: chart-example-tls
# hosts:
# - chart-example.local

# Default persistent storage values
# NOTE - `rollupName` will be used with `persistentVolumeName` to generate names for kubernetes resources.
# e.g. astria-executor-pv, astria-executor-pvc
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ 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.2.0
version: 0.2.2

# 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: steezeburger
url: astria.org
- name: joroshiba
url: astria.org
32 changes: 32 additions & 0 deletions charts/sequencer-faucet/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{/*
Return if ingress is stable.
*/}}
{{- define "sequencer.ingress.isStable" -}}
{{- eq (include "sequencer.ingress.apiVersion" .) "networking.k8s.io/v1" }}
{{- end }}

{{/*
Return if ingress supports ingressClassName.
*/}}
{{- define "sequencer.ingress.supportsIngressClassName" -}}
{{- or (eq (include "sequencer.ingress.isStable" .) "true") (and (eq (include "sequencer.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) }}
{{- end }}

{{/*
Return if ingress supports pathType.
*/}}
{{- define "sequencer.ingress.supportsPathType" -}}
{{- or (eq (include "sequencer.ingress.isStable" .) "true") (and (eq (include "sequencer.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) }}
{{- end }}

Return the appropriate apiVersion for ingress.
*/}}
{{- define "sequencer.ingress.apiVersion" -}}
{{- if and ($.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" .Capabilities.KubeVersion.Version) }}
{{- print "networking.k8s.io/v1" }}
{{- else if $.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
{{- print "networking.k8s.io/v1beta1" }}
{{- else }}
{{- print "extensions/v1beta1" }}
{{- end }}
{{- end }}
Loading

0 comments on commit b7496c5

Please sign in to comment.