Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sbaizet-ledger committed May 23, 2024
0 parents commit b81b020
Show file tree
Hide file tree
Showing 83 changed files with 21,211 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/lint-test-charts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Lint,test charts

on:
push:

jobs:
changed:
runs-on: ubuntu-latest
outputs:
charts: ${{ steps.list-changed.outputs.changed }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.7.2
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.2.0
- name: Run chart-testing (list-changed)
id: list-changed
env:
CT_DEBUG: "false"
run: |
# changed=$(ct list-changed --config .github/ct.yaml)
# [[ -n "$changed" ]] &&
# ( echo -e "Charts changed :\n$changed\n" && echo "::set-output name=changed::$(echo $changed | sed "s/\n/ /g")" ) ||
# ( echo "No changes - failing" && exit 1 )
echo "::set-output name=changed::$(echo 'charts')"
echo "charts"
helm-chart-testing:
runs-on: ubuntu-latest
environment: test
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.6.1

- 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 }} --config .github/ct.yaml
26 changes: 26 additions & 0 deletions .github/workflows/renovate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: renovate-config-validator

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
pull_request:
branches:
- develop
push:
branches:
- develop
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Verify Renovate Configuration
uses: suzuki-shunsuke/github-action-renovate-config-validator@v1.0.1
- name: Renovate
uses: renovatebot/github-action@v40.1.6
env:
RENOVATE_REPOSITORIES: "scroll-tech/scroll-stack"
with:
token: "${{ secrets.RENOVATE_TOKEN }}"
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.tgz
*.lock
.idea
genesis.json
config-contracts.toml
charts/scroll-stack/*.json
88 changes: 88 additions & 0 deletions charts/scroll-stack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
apiVersion: v2
description: scroll helm charts to deploy scroll's stack
name: scroll-stack
version: 0.0.1
appVersion: v0.1.0
kubeVersion: ">=1.22.0-0"
maintainers:
- name: scroll-sre
email: sebastien@scroll.io
keywords:
- scroll
- scroll-stack
home: https://github.com/scroll-tech/scroll-stack
sources:
- A list of URLs to source code for this project (optional)
icon: A URL to an SVG or PNG image to be used as an icon (optional).
dependencies:
- name: anvil
version: 0.0.1
condition: anvil.enabled
- name: balance-checker
version: 0.0.1
condition: balance-checker.enabled
- name: blockscout
version: 0.0.1
condition: blockscout.enabled
- name: bridge-history-api
version: 0.0.1
condition: bridge-history-api.enabled
- name: bridge-history-fetcher
version: 0.0.1
condition: bridge-history-fetcher.enabled
- name: blockscout-sc-verifier
version: 0.0.1
condition: blockscout-sc-verifier.enabled
- name: chain-monitor
version: 0.0.1
condition: chain-monitor.enabled
- name: contracts
version: 0.0.1
condition: contracts.enabled
- name: coordinator-api
version: 0.0.1
condition: coordinator-api.enabled
- name: coordinator-cron
version: 0.0.1
condition: coordinator-cron.enabled
- name: event-watcher
version: 0.0.1
condition: event-watcher.enabled
- name: frontends
version: 0.0.1
condition: frontends.enabled
- name: gas-oracle
version: 0.0.1
condition: gas-oracle.enabled
- name: l2geth-bootnode
version: 0.0.1
condition: l2geth-bootnode.enabled
- name: l2geth-rpc
version: 0.0.1
condition: l2geth-rpc.enabled
- name: grafana
repository: "https://grafana.github.io/helm-charts"
version: 6.58.8
condition: grafana.enabled
- name: l2geth-signer
version: 0.0.1
condition: l2geth-signer.enabled
- name: loki-stack
repository: "https://grafana.github.io/helm-charts"
version: 2.10.2
condition: loki-stack.enabled
- name: postgresql
repository: "oci://registry-1.docker.io/bitnamicharts"
version: 13.2.21
condition: postgresql.enabled
- name: kube-prometheus-stack
repository: "https://prometheus-community.github.io/helm-charts"
version: 58.5.1
condition: kube-prometheus-stack.enabled
- name: rollup-relayer
version: 0.0.1
condition: rollup-relayer.enabled
- name: rpc-gateway
version: 0.0.1
condition: rpc-gateway.enabled
14 changes: 14 additions & 0 deletions charts/scroll-stack/charts/anvil/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: v2
description: anvil helm charts
name: anvil
version: 0.0.1
appVersion: v0.1.0
kubeVersion: ">=1.22.0-0"
maintainers:
- name: scroll-sre
email: sebastien@scroll.io
dependencies:
- name: common
repository: https://bjw-s.github.io/helm-charts
version: 1.5.1
14 changes: 14 additions & 0 deletions charts/scroll-stack/charts/anvil/templates/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
{{- include "bjw-s.common.loader.init" . }}

{{- define "app-template.hardcodedValues" -}}
# Set the nameOverride based on the release name if no override has been set
{{ if not .Values.global.nameOverride }}
global:
nameOverride: "{{ .Release.Name }}"
{{ end }}
{{- end -}}
{{- $_ := mergeOverwrite .Values (include "app-template.hardcodedValues" . | fromYaml) -}}

{{/* Render the templates */}}
{{ include "bjw-s.common.loader.generate" . }}
50 changes: 50 additions & 0 deletions charts/scroll-stack/charts/anvil/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
global:
nameOverride: &app_name anvil
fullnameOverride: *app_name

controller:
replicas: 1
strategy: Recreate
type: deployment

image:
repository: ghcr.io/foundry-rs/foundry
pullPolicy: Always
tag: nightly-19d69f277de96f621d930cdb767a9693c55ae8e1

env:
- name: CHAIN_ID
value: 111111

command:
["/bin/sh","-c","anvil --host 0.0.0.0 --port 8545 --chain-id ${CHAIN_ID}"]
resources:
requests:
memory: "100Mi"
cpu: "50m"
limits:
memory: "500Mi"
cpu: "100m"

service:
main:
enabled: true
ports:
http:
enabled: true
port: 8545
targetPort: 8545

defaultProbes: &default_probes
enabled: false
tcpSocket:
port: 8545

probes:
liveness:
<< : *default_probes
readiness:
<< : *default_probes
startup:
<< : *default_probes
14 changes: 14 additions & 0 deletions charts/scroll-stack/charts/balance-checker/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: v2
description: balance-checker helm charts
name: balance-checker
version: 0.0.1
appVersion: v0.1.0
kubeVersion: ">=1.22.0-0"
maintainers:
- name: scroll-sre
email: sebastien@scroll.io
dependencies:
- name: common
repository: https://bjw-s.github.io/helm-charts
version: 1.5.1
14 changes: 14 additions & 0 deletions charts/scroll-stack/charts/balance-checker/templates/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
{{- include "bjw-s.common.loader.init" . }}

{{- define "app-template.hardcodedValues" -}}
# Set the nameOverride based on the release name if no override has been set
{{ if not .Values.global.nameOverride }}
global:
nameOverride: "{{ .Release.Name }}"
{{ end }}
{{- end -}}
{{- $_ := mergeOverwrite .Values (include "app-template.hardcodedValues" . | fromYaml) -}}

{{/* Render the templates */}}
{{ include "bjw-s.common.loader.generate" . }}
79 changes: 79 additions & 0 deletions charts/scroll-stack/charts/balance-checker/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
global:
nameOverride: &app_name balance-checker
fullnameOverride: *app_name

image:
repository: scrolltech/balance-checker
pullPolicy: Always
tag: 0.0.2

env:
- name: CONFIG_PATH
value: "app/config/balance-checker-config.json"
- name: BIND_PORT
value: "8080"
- name: METRICS_PORT
value: "8090"
- name: METRICS_URL
value: 0.0.0.0
- name: SLACK_NOTIFY_URL
value: ""
- name: SCROLL_L1_RPC
value: "http://anvil:8545/l1"
- name: SCROLL_L2_RPC
value: "http://l2geth-rpc:8545"

resources:
requests:
memory: "100Mi"
cpu: "50m"
limits:
memory: "500Mi"
cpu: "100m"

persistence:
*app_name:
enabled: yes
type: configMap
mountPath: /app/config/
name: balance-checker-config

service:
main:
enabled: true
ports:
http:
enabled: true
port: 80
metrics:
enabled: true
port: 8090
targetPort: 8090

defaultProbes: &default_probes
enabled: true
custom: true
spec:
httpGet:
path: "/"
port: 8090

probes:
liveness:
<< : *default_probes
readiness:
<< : *default_probes
startup:
<< : *default_probes

serviceMonitor:
main:
enabled: true
labels:
release: scroll-stack
serviceName: '{{ include "bjw-s.common.lib.chart.names.fullname" $ }}'
endpoints:
- port: metrics
interval: 1m
scrapeTimeout: 10s
Loading

0 comments on commit b81b020

Please sign in to comment.