Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm charts #33

Closed
wants to merge 57 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
c463b39
feat: add `GetVkResponse` (#16)
0xmountaintop Sep 27, 2024
9db7279
implement sindri client
0xmountaintop Sep 29, 2024
55404a9
compile
lispc Sep 29, 2024
e3fe8bc
fix url join
lispc Sep 29, 2024
1e7a475
improve
lispc Sep 29, 2024
a73fa37
hardcode version
lispc Sep 29, 2024
04318dc
fix vk codec
lispc Sep 29, 2024
3eb6af7
handle reformat_vk error
lispc Sep 29, 2024
0b2a46d
merge
lispc Sep 30, 2024
41ffe50
hardcode versio
lispc Sep 30, 2024
516bd48
fix prover_height
lispc Sep 30, 2024
a21cd3d
improve error
lispc Sep 30, 2024
cc388d3
fix status
lispc Sep 30, 2024
d873eb3
fix SindriTaskStatusResponse
lispc Sep 30, 2024
442669b
improve logging
lispc Sep 30, 2024
d08020f
skip compute_time_sec
lispc Sep 30, 2024
8ae991b
deal with chunk_proof for now
lispc Sep 30, 2024
3096a7c
add tretry
lispc Sep 30, 2024
2907e41
Revert "Revert "refactor: use tokio async pattern (#15)" (#17)"
0xmountaintop Oct 4, 2024
b65870e
fix
lispc Oct 4, 2024
f7af941
merge
lispc Oct 4, 2024
c179c95
fix
lispc Oct 4, 2024
f0b2473
merge
lispc Oct 4, 2024
825ab86
Merge remote-tracking branch 'origin/main' into haoyu/sindri_tokio
lispc Oct 4, 2024
5667bb4
fix task_type
lispc Oct 8, 2024
7db58b1
Merge remote-tracking branch 'origin/main' into haoyu/sindri_tokio
0xmountaintop Oct 8, 2024
e97a9b5
refactor (#22)
0xmountaintop Oct 8, 2024
f5b246f
Merge remote-tracking branch 'origin/main' into haoyu/sindri_tokio
0xmountaintop Oct 8, 2024
2791edc
Merge remote-tracking branch 'origin/main' into haoyu/sindri_tokio
0xmountaintop Oct 9, 2024
0523a71
support general proofs (#25)
0xmountaintop Oct 10, 2024
5ced57e
fix prover_type in login
0xmountaintop Oct 13, 2024
dcc26bc
update
lispc Oct 16, 2024
f502ae3
Merge remote-tracking branch 'origin/main' into haoyu/sindri_tokio
lispc Oct 16, 2024
c13a0cc
clean up
lispc Oct 16, 2024
bc5533a
refactor
lispc Oct 16, 2024
0643b29
update types
lispc Oct 16, 2024
30def05
Merge remote-tracking branch 'origin/main' into haoyu/sindri_tokio
lispc Oct 16, 2024
24894e8
update comments
lispc Oct 16, 2024
76d5973
add comments
lispc Oct 17, 2024
bf53e0c
merge
lispc Oct 17, 2024
709396b
add helm chart
sbaizet-ledger Oct 17, 2024
5b0c305
add config for ct tool
sbaizet-ledger Oct 17, 2024
f8df307
trigger a change
sbaizet-ledger Oct 17, 2024
987332a
add production.yaml file in chart
sbaizet-ledger Oct 18, 2024
107c6d9
bump chart version
sbaizet-ledger Oct 18, 2024
07897d7
add example-config
sbaizet-ledger Oct 18, 2024
b6f902a
adjusting following comments in PR
sbaizet-ledger Oct 21, 2024
62af83f
fix the description
sbaizet-ledger Oct 21, 2024
3246c1c
fix linting
sbaizet-ledger Oct 21, 2024
e6e60a6
add helm chart (#30)
sbaizet-ledger Oct 21, 2024
c05f9dd
allow multiple versions of scroll-proving-sdk
sbaizet-ledger Oct 22, 2024
835b260
Merge branch 'haoyu/sindri_tokio' into helm-charts
sbaizet-ledger Oct 22, 2024
384533e
chart bump
sbaizet-ledger Oct 22, 2024
a67adcf
fix lint
sbaizet-ledger Oct 22, 2024
abf763a
fix typo
sbaizet-ledger Oct 22, 2024
af81e18
update certificates in docker image
sbaizet-ledger Oct 22, 2024
4638b7d
add certificates to docker image and persistent volume to store keys …
sbaizet-ledger Oct 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/chart_schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: str()
home: str(required=False)
version: str()
apiVersion: str()
appVersion: any(str(), num(), required=False)
description: str(required=False)
keywords: list(str(), required=False)
sources: list(str(), required=False)
maintainers: list(include('maintainer'), required=False)
dependencies: list(include('dependency'), required=False)
icon: str(required=False)
engine: str(required=False)
condition: str(required=False)
tags: str(required=False)
deprecated: bool(required=False)
kubeVersion: str(required=False)
annotations: map(str(), str(), required=False)
type: str(required=False)
---
maintainer:
name: str()
email: str(required=False)
url: str(required=False)
---
dependency:
name: str()
version: str()
repository: str(required=False)
condition: str(required=False)
tags: list(str(), required=False)
enabled: bool(required=False)
import-values: any(list(str()), list(include('import-value')), required=False)
alias: str(required=False)
---
import-value:
child: str()
parent: str()
42 changes: 42 additions & 0 deletions .github/lintconf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
rules:
braces:
min-spaces-inside: 0
max-spaces-inside: 0
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
brackets:
min-spaces-inside: 0
max-spaces-inside: 0
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
colons:
max-spaces-before: 0
max-spaces-after: 1
commas:
max-spaces-before: 0
min-spaces-after: 1
max-spaces-after: 1
comments:
require-starting-space: true
min-spaces-from-content: 2
document-end: disable
document-start: disable # No --- to start a file
empty-lines:
max: 2
max-start: 0
max-end: 0
hyphens:
max-spaces-after: 1
indentation:
spaces: consistent
indent-sequences: whatever # - list indentation will handle both indentation and without
check-multi-line-strings: false
key-duplicates: enable
line-length: disable # Lines can be any length
new-line-at-end-of-file: enable
new-lines:
type: unix
trailing-spaces: enable
truthy:
level: warning
101 changes: 101 additions & 0 deletions .github/workflows/publish-chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Lint, test and publish charts

on:
push:
branches: [ main ]
paths:
- 'charts/**'

jobs:
helm-chart-testing:
name: 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@v5
with:
python-version: '3.x'
check-latest: true

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

- name: Helm registry login
run: |
helm registry login ghcr.io/scroll-tech/helm/scroll-sdk --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

# List chart change except scroll-sdk
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --excluded-charts scroll-sdk --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 --config ct.yaml --excluded-charts scroll-sdk --target-branch ${{ github.event.repository.default_branch }}

publish-ghcr:
name: publish-to-github
runs-on: ubuntu-latest
needs:
- helm-chart-testing
outputs:
charts: ${{ steps.list-changed.outputs.changed }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.event.repository.default_branch }}
list-files: shell
filters: |
addedOrModified:
- added|modified: 'charts/**'

- name: Helm registry login
run: |
helm registry login ghcr.io/scroll-tech/helm/scroll-sdk --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

- name: Push chart to ghcr
if: steps.filter.outputs.addedOrModified == 'true'
env:
HELM_EXPERIMENTAL_OCI: 1
run: |
set -x
CHARTS=()
PATHS=(${{ steps.filter.outputs.addedOrModified_files }})
echo ${PATHS}
# Get only the chart paths
for i in "${PATHS[@]}"
do
chart=$(echo $i | awk -F "/" '{print $2}')
done
# Remove duplicates
CHARTS=( `for i in ${CHARTS[@]}; do echo $i; done | sort -u` )
echo "CHARTS: ${CHARTS[@]}"
for chart in ${CHARTS[@]}; do
helm dependencies build charts/$chart
helm package charts/$chart
export CHART_VERSION=$(grep 'version:' charts/$chart/Chart.yaml | head -n1 | awk '{ print $2 }')
helm push $chart-${CHART_VERSION}.tgz oci://ghcr.io/scroll-tech/scroll-sdk/helm
done
103 changes: 103 additions & 0 deletions .github/workflows/publish-dev-chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Lint, test and publish dev charts

on:
push:
paths:
- 'charts/**'

env:
HELM_REGISTRY: ghcr.io/scroll-tech/scroll-sdk/helm/dev

jobs:
helm-chart-testing-not-scroll-sdk:
name: chart-testing-without-scroll-sdk
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@v5
with:
python-version: '3.x'
check-latest: true

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

- name: Helm registry login
run: |
helm registry login ghcr.io/scroll-tech/helm/scroll-sdk --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

# List chart change except scroll-sdk
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --excluded-charts scroll-sdk --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 --config ct.yaml --excluded-charts scroll-sdk --target-branch ${{ github.event.repository.default_branch }}

publish-ghcr-not-scroll-sdk:
name: publish-to-github-without-scroll-sdk
runs-on: ubuntu-latest
needs:
- helm-chart-testing-not-scroll-sdk
outputs:
charts: ${{ steps.list-changed.outputs.changed }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.event.repository.default_branch }}
list-files: shell
filters: |
addedOrModified:
- added|modified: 'charts/**'

- name: Helm registry login
run: |
helm registry login ghcr.io/scroll-tech/helm/scroll-sdk --username ${{ github.actor }} --password ${{ secrets.HELM_GITHUB_PASSWORD }}
env:
HELM_GITHUB_PASSWORD: "${{ secrets.HELM_GITHUB_PASSWORD }}"

- name: Push chart to ghcr
if: steps.filter.outputs.addedOrModified == 'true'
env:
HELM_EXPERIMENTAL_OCI: 1
run: |
set -x
CHARTS=()
PATHS=(${{ steps.filter.outputs.addedOrModified_files }})
echo ${PATHS}
# Get only the chart paths
for i in "${PATHS[@]}"
do
chart=$(echo $i | awk -F "/" '{print $2}')
done
# Remove duplicates
CHARTS=( `for i in ${CHARTS[@]}; do echo $i; done | sort -u` )
echo "CHARTS: ${CHARTS[@]}"
for chart in ${CHARTS[@]}; do
helm dependencies build charts/$chart
helm package charts/$chart
export CHART_VERSION=$(grep 'version:' charts/$chart/Chart.yaml | head -n1 | awk '{ print $2 }')
helm push $chart-${CHART_VERSION}.tgz oci://${HELM_REGISTRY}
done
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,11 @@ target/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
#.idea/

config.json
keys/

# Helm chart related
*.lock
*.tgz
14 changes: 14 additions & 0 deletions charts/scroll-proving-sdk/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: v2
description: Example chart for showing how to package a service built using the scroll-proving-sdk library
name: scroll-proving-sdk
version: 0.0.5
appVersion: v0.1.0
kubeVersion: ">=1.22.0-0"
maintainers:
- name: scroll-tech
email: sebastien@scroll.io
dependencies:
- name: common
repository: "oci://ghcr.io/scroll-tech/scroll-sdk/helm"
version: 1.5.1
68 changes: 68 additions & 0 deletions charts/scroll-proving-sdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# scroll-proving-sdk

![Version: 0.0.5](https://img.shields.io/badge/Version-0.0.5-informational?style=flat-square) ![AppVersion: v0.1.0](https://img.shields.io/badge/AppVersion-v0.1.0-informational?style=flat-square)

Example chart for showing how to package a service built using the scroll-proving-sdk library

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| scroll-tech | <sebastien@scroll.io> | |

## Requirements

Kubernetes: `>=1.22.0-0`

| Repository | Name | Version |
|------------|------|---------|
| oci://ghcr.io/scroll-tech/scroll-sdk/helm | common | 1.5.1 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| command[0] | string | `"/bin/sh"` | |
| command[1] | string | `"-c"` | |
| command[2] | string | `"exec cloud --config /sdk_prover/config.json"` | |
| defaultProbes.custom | bool | `true` | |
| defaultProbes.enabled | bool | `true` | |
| defaultProbes.spec.httpGet.path | string | `"/"` | |
| defaultProbes.spec.httpGet.port | int | `80` | |
| global.fullnameOverride | string | `"scroll-proving-sdk"` | |
| global.nameOverride | string | `"scroll-proving-sdk"` | |
| image.pullPolicy | string | `"Always"` | |
| image.repository | string | `"scrolltech/sdk-cloud-prover"` | |
| image.tag | string | `"sindri-v0.0.1"` | |
| persistence.config.enabled | bool | `true` | |
| persistence.config.mountPath | string | `"/sdk_prover/"` | |
| persistence.config.name | string | `"scroll-proving-sdk-config"` | |
| persistence.config.type | string | `"configMap"` | |
| persistence.keys.accessMode | string | `"ReadWriteOnce"` | |
| persistence.keys.enabled | bool | `true` | |
| persistence.keys.mountPath | string | `"/keys/"` | |
| persistence.keys.size | string | `"10Mi"` | |
| persistence.keys.type | string | `"pvc"` | |
| probes.liveness.<<.custom | bool | `true` | |
| probes.liveness.<<.enabled | bool | `true` | |
| probes.liveness.<<.spec.httpGet.path | string | `"/"` | |
| probes.liveness.<<.spec.httpGet.port | int | `80` | |
| probes.readiness.<<.custom | bool | `true` | |
| probes.readiness.<<.enabled | bool | `true` | |
| probes.readiness.<<.spec.httpGet.path | string | `"/"` | |
| probes.readiness.<<.spec.httpGet.port | int | `80` | |
| probes.startup.<<.custom | bool | `true` | |
| probes.startup.<<.enabled | bool | `true` | |
| probes.startup.<<.spec.httpGet.path | string | `"/"` | |
| probes.startup.<<.spec.httpGet.port | int | `80` | |
| resources.limits.cpu | string | `"100m"` | |
| resources.limits.memory | string | `"500Mi"` | |
| resources.requests.cpu | string | `"50m"` | |
| resources.requests.memory | string | `"100Mi"` | |
| scrollConfig | string | `"{}\n"` | |
| service.main.enabled | bool | `true` | |
| service.main.ports.http.enabled | bool | `true` | |
| service.main.ports.http.port | int | `80` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
Loading
Loading