Skip to content

Commit

Permalink
Feat remove config files (#176)
Browse files Browse the repository at this point in the history
* test remove config files

* put genesis config into value file

* add config in value file for balance-checker

* add config in value file for bridge-history-api

* fix bridge-history-api

* bridge-history-fetcher

* chain-monitor

* coordinator-api

* coordinator-cron

* frontend

* gas-oracle

* rollup-explorer-backend

* rollup-node

* contracts

* fix env coordinator-api

* update scroll-sdk

* test with dev charts

* fix: add L2GETH_L1_CONTRACT_DEPLOYMENT_BLOCK on production files of bootnodes (#171)

* feat: add scroll admin system (#166)

* feat: add admin system

* fix: update frontend config

* fix: admin system add default normal user

* fix: production environment

* fix: test

* fix: coordinator api env (#173)

* coordinator-api

* update scroll-sdk

* test with dev charts

* testing

* remove config files from scroll-sdk

* fix coordinator api and bump version of some charts

* update the devnet makefile

* bump scroll-sdk to 0.0.38

* add script to prepare config files for devnet

* remove configs folder in charts

* remove isStandalone value

* fix missing labels on config files

* add config folder for scroll-sdk only

---------

Co-authored-by: Morty <[email protected]>
  • Loading branch information
sbaizet-ledger and yiweichi authored Sep 25, 2024
1 parent a7b0d7c commit b5089c8
Show file tree
Hide file tree
Showing 108 changed files with 914 additions and 297 deletions.
2 changes: 1 addition & 1 deletion charts/admin-system-backend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v2
description: admin-system-backend helm charts
name: admin-system-backend
version: 0.0.1
version: 0.0.2
appVersion: v0.1.0
kubeVersion: ">=1.22.0-0"
maintainers:
Expand Down
3 changes: 2 additions & 1 deletion charts/admin-system-backend/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# admin-system-backend

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

admin-system-backend helm charts

Expand Down Expand Up @@ -103,6 +103,7 @@ Kubernetes: `>=1.22.0-0`
| resources.limits.memory | string | `"200Mi"` | |
| resources.requests.cpu | string | `"50m"` | |
| resources.requests.memory | string | `"50Mi"` | |
| scrollConfig | string | `"{}\n"` | |
| service.main.enabled | bool | `true` | |
| service.main.ports.http.enabled | bool | `true` | |
| service.main.ports.http.port | int | `8080` | |
Expand Down
Empty file.
5 changes: 2 additions & 3 deletions charts/admin-system-backend/templates/config-file.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{{- if .Values.global.isStandalone }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: admin-system-backend-config
data:
{{ (.Files.Glob "configs/admin-system-backend-config.json").AsConfig | indent 2 }}
admin-system-backend-config.json: |
{{ .Values.scrollConfig | indent 4 }}
---
{{- end }}
3 changes: 3 additions & 0 deletions charts/admin-system-backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,6 @@ serviceMonitor:
- port: http
interval: 1m
scrapeTimeout: 10s

scrollConfig: |
{}
3 changes: 0 additions & 3 deletions charts/admin-system-backend/values/production.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
global:
isStandalone: true

initContainers:
1-check-postgres-connection:
image: atkrad/wait4x:latest
Expand Down
2 changes: 1 addition & 1 deletion charts/admin-system-cron/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v2
description: admin-system-cron helm charts
name: admin-system-cron
version: 0.0.1
version: 0.0.2
appVersion: v0.1.0
kubeVersion: ">=1.22.0-0"
maintainers:
Expand Down
3 changes: 2 additions & 1 deletion charts/admin-system-cron/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# admin-system-cron

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

admin-system-cron helm charts

Expand Down Expand Up @@ -62,6 +62,7 @@ Kubernetes: `>=1.22.0-0`
| resources.limits.memory | string | `"1Gi"` | |
| resources.requests.cpu | string | `"500m"` | |
| resources.requests.memory | string | `"500Mi"` | |
| scrollConfig | string | `"{}\n"` | |
| service.main.enabled | bool | `true` | |
| service.main.ports.http.enabled | bool | `true` | |
| service.main.ports.http.port | int | `8080` | |
Expand Down
Empty file.
7 changes: 4 additions & 3 deletions charts/admin-system-cron/templates/config-file.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{{- if .Values.global.isStandalone }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: admin-system-cron-config
labels:
{{- include "scroll-sdk.labels" $ | nindent 4 }}
data:
{{ (.Files.Glob "configs/admin-system-backend-config.json").AsConfig | indent 2 }}
admin-system-backend-config.json: |
{{ .Values.scrollConfig | indent 4 }}
---
{{- end }}
47 changes: 47 additions & 0 deletions charts/admin-system-cron/templates/helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "scroll-sdk.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "scroll-sdk.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and build as used by the chart label.
*/}}
{{- define "scroll-sdk.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "scroll-sdk.labels" -}}
helm.sh/chart: {{ include "scroll-sdk.chart" . }}
{{ include "scroll-sdk.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/build: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "scroll-sdk.selectorLabels" -}}
app.kubernetes.io/name: {{ include "scroll-sdk.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/admin-system-cron/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,6 @@ serviceMonitor:
- port: http
interval: 1m
scrapeTimeout: 10s

scrollConfig: |
{}
3 changes: 0 additions & 3 deletions charts/admin-system-cron/values/production.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
global:
isStandalone: true

initContainers:
1-check-postgres-connection:
image: atkrad/wait4x:latest
Expand Down
2 changes: 1 addition & 1 deletion charts/admin-system-dashboard/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v2
description: admin-system-dashboard helm charts
name: admin-system-dashboard
version: 0.0.1
version: 0.0.2
appVersion: v0.1.0
kubeVersion: ">=1.22.0-0"
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion charts/admin-system-dashboard/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# admin-system-dashboard

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

admin-system-dashboard helm charts

Expand Down
Empty file.
3 changes: 0 additions & 3 deletions charts/admin-system-dashboard/values/production.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
global:
isStandalone: true

ingress:
main:
ingressClassName: "nginx"
Expand Down
2 changes: 1 addition & 1 deletion charts/balance-checker/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v2
description: balance-checker helm charts
name: balance-checker
version: 0.0.2
version: 0.0.3
appVersion: v0.1.0
kubeVersion: ">=1.22.0-0"
maintainers:
Expand Down
3 changes: 2 additions & 1 deletion charts/balance-checker/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# balance-checker

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

balance-checker helm charts

Expand Down Expand Up @@ -85,6 +85,7 @@ Kubernetes: `>=1.22.0-0`
| 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` | |
Expand Down
Empty file.
8 changes: 4 additions & 4 deletions charts/balance-checker/templates/config-file.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{- if .Values.global.isStandalone }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: balance-checker-config
labels:
{{- include "scroll-sdk.labels" $ | nindent 4 }}
data:
{{ (.Files.Glob "configs/balance-checker-config.json").AsConfig | indent 2 }}
---
{{- end }}
balance-checker-config.json : |
{{ .Values.scrollConfig | nindent 4 }}
47 changes: 47 additions & 0 deletions charts/balance-checker/templates/helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "scroll-sdk.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "scroll-sdk.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and build as used by the chart label.
*/}}
{{- define "scroll-sdk.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "scroll-sdk.labels" -}}
helm.sh/chart: {{ include "scroll-sdk.chart" . }}
{{ include "scroll-sdk.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/build: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "scroll-sdk.selectorLabels" -}}
app.kubernetes.io/name: {{ include "scroll-sdk.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/balance-checker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,6 @@ serviceMonitor:
- port: metrics
interval: 1m
scrapeTimeout: 10s

scrollConfig: |
{}
6 changes: 3 additions & 3 deletions charts/balance-checker/values/production.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
global:
isStandalone: true

configMaps:
env:
enabled: true
data:
SCROLL_L1_RPC: ""

scrollConfig: |
{}
2 changes: 1 addition & 1 deletion charts/bridge-history-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v2
description: bridge-history-api helm charts
name: bridge-history-api
version: 0.0.6
version: 0.0.7
appVersion: v0.1.0
kubeVersion: ">=1.22.0-0"
maintainers:
Expand Down
7 changes: 4 additions & 3 deletions charts/bridge-history-api/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bridge-history-api

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

bridge-history-api helm charts

Expand All @@ -27,7 +27,7 @@ Kubernetes: `>=1.22.0-0`
| additionalContainers.redis.name | string | `"redis"` | |
| command[0] | string | `"/bin/sh"` | |
| command[1] | string | `"-c"` | |
| command[2] | string | `"bridgehistoryapi-api --config /app/conf/bridge-history-config.json --metrics --metrics.addr 0.0.0.0 --metrics.port ${METRICS_PORT} --log.debug"` | |
| command[2] | string | `"bridgehistoryapi-api --config /app/conf/bridge-history-api-config.json --metrics --metrics.addr 0.0.0.0 --metrics.port ${METRICS_PORT} --log.debug"` | |
| controller.replicas | int | `1` | |
| controller.strategy | string | `"RollingUpdate"` | |
| controller.type | string | `"deployment"` | |
Expand Down Expand Up @@ -69,7 +69,7 @@ Kubernetes: `>=1.22.0-0`
| initContainers.2-wait-for-l2-sequencer.image | string | `"atkrad/wait4x:latest"` | |
| persistence.bridge-history-api.enabled | bool | `true` | |
| persistence.bridge-history-api.mountPath | string | `"/app/conf/"` | |
| persistence.bridge-history-api.name | string | `"bridge-history-config"` | |
| persistence.bridge-history-api.name | string | `"bridge-history-api-config"` | |
| persistence.bridge-history-api.type | string | `"configMap"` | |
| persistence.wait-for-l1-script.defaultMode | string | `"0777"` | |
| persistence.wait-for-l1-script.enabled | bool | `true` | |
Expand All @@ -91,6 +91,7 @@ Kubernetes: `>=1.22.0-0`
| 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 | `8080` | |
Expand Down
Empty file.
8 changes: 4 additions & 4 deletions charts/bridge-history-api/templates/config-file.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{- if .Values.global.isStandalone }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: bridge-history-api-config
labels:
{{- include "scroll-sdk.labels" $ | nindent 4 }}
data:
{{ (.Files.Glob "configs/bridge-history-config.json").AsConfig | indent 2 }}
---
{{- end }}
bridge-history-api-config.json: |
{{ .Values.scrollConfig | indent 4 }}
47 changes: 47 additions & 0 deletions charts/bridge-history-api/templates/helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "scroll-sdk.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "scroll-sdk.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and build as used by the chart label.
*/}}
{{- define "scroll-sdk.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "scroll-sdk.labels" -}}
helm.sh/chart: {{ include "scroll-sdk.chart" . }}
{{ include "scroll-sdk.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/build: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "scroll-sdk.selectorLabels" -}}
app.kubernetes.io/name: {{ include "scroll-sdk.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
Loading

0 comments on commit b5089c8

Please sign in to comment.