Skip to content

Commit

Permalink
Merge pull request #362 from celo-org/jcortejoso/op-conductor
Browse files Browse the repository at this point in the history
Added chart for op-conductor
  • Loading branch information
jcortejoso authored Aug 1, 2024
2 parents 53fdb8b + 7346dde commit 65f99a0
Show file tree
Hide file tree
Showing 15 changed files with 599 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The charts are published to the OCI registry at `oci://us-west1-docker.pkg.dev/d
- [odis-signer](./charts/odis-signer/README.md) - Helm chart for deploying Celo ODIS signer
- [op-batcher](./charts/op-batcher/README.md) - Celo implementation for op-batcher client (Optimism Rollup)
- [op-bootnode](./charts/op-bootnode/README.md) - Celo implementation for op-bootnode (Optimism Rollup)
- [op-conductor](./charts/op-conductor/README.md) - Helm chart deploying OP Conductor, a HA controller for op-node
- [op-geth](./charts/op-geth/README.md) - Celo implementation for op-geth execution engine (Optimism Rollup)
- [op-node](./charts/op-node/README.md) - Celo implementation for op-node consensus engine (Optimism Rollup)
- [op-proposer](./charts/op-proposer/README.md) - Celo implementation for op-proposer client (Optimism Rollup)
Expand Down
23 changes: 23 additions & 0 deletions charts/op-conductor/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
27 changes: 27 additions & 0 deletions charts/op-conductor/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: op-conductor
apiVersion: v2
version: 0.0.1
description: Helm chart deploying OP Conductor, a HA controller for op-node
home: https://clabs.co
sources:
- https://github.com/Layr-Labs/eigenda-proxy/tree/main
- https://celo.org
- https://docs.celo.org
- https://clabs.co
- https://github.com/celo-org
keywords:
- celo
- blockchain
- optimism
- rollup
- ethereum
- layer2
- op-stack
maintainers:
- name: cLabs
email: devops@clabs.co
url: https://clabs.co
type: application
icon: https://pbs.twimg.com/profile_images/1613170131491848195/InjXBNx9_400x400.jpg
appVersion: v1.8.0
84 changes: 84 additions & 0 deletions charts/op-conductor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# op-conductor

![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.8.0](https://img.shields.io/badge/AppVersion-v1.8.0-informational?style=flat-square)

Helm chart deploying OP Conductor, a HA controller for op-node

**Homepage:** <https://clabs.co>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| cLabs | <devops@clabs.co> | <https://clabs.co> |

## Source Code

* <https://github.com/Layr-Labs/eigenda-proxy/tree/main>
* <https://celo.org>
* <https://docs.celo.org>
* <https://clabs.co>
* <https://github.com/celo-org>

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| config.consensus.addr | string | `"0.0.0.0"` | |
| config.consensus.port | int | `50050` | |
| config.execution.rpc | string | `"http://op-geth:8545"` | |
| config.healthcheck.interval | int | `0` | |
| config.healthcheck.minPeerCount | int | `0` | |
| config.healthcheck.safeEnabled | bool | `false` | |
| config.healthcheck.safeInterval | int | `1200` | |
| config.healthcheck.unsafeInterval | int | `0` | |
| config.log.format | string | `"json"` | |
| config.log.level | string | `"INFO"` | |
| config.metrics.addr | string | `"0.0.0.0"` | |
| config.metrics.enabled | bool | `true` | |
| config.metrics.port | int | `7300` | |
| config.network | string | `""` | |
| config.node.rpc | string | `"http://op-node:8547"` | |
| config.paused | bool | `false` | |
| config.raft.bootstrap | bool | `false` | |
| config.raft.server.id | int | `1` | |
| config.raft.storage.dir | string | `"/raft"` | |
| config.rpc.addr | string | `"0.0.0.0"` | |
| config.rpc.enableAdmin | bool | `false` | |
| config.rpc.enableProxy | bool | `true` | |
| config.rpc.port | int | `8545` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"us-docker.pkg.dev/oplabs-tools-artifacts/images/op-conductor"` | |
| image.tag | string | `"v0.0.1-rc.4"` | |
| init.image.pullPolicy | string | `"IfNotPresent"` | |
| init.image.repository | string | `"alpine"` | |
| init.image.tag | float | `3.19` | |
| init.rollup.url | string | `"https://storage.googleapis.com/cel2-rollup-files/dango/rollup.json"` | |
| persistence.mountPath | string | `"/raft"` | |
| persistence.pvc.accessMode | string | `"ReadWriteOnce"` | |
| persistence.pvc.annotations | string | `nil` | |
| persistence.pvc.size | string | `"1Gi"` | |
| persistence.pvc.storageClass | string | `""` | |
| persistence.type | string | `"pvc"` | |
| podSecurityContext | object | `{}` | |
| replicaCount | int | `1` | |
| secrets.jwt.secretKey | string | `""` | |
| secrets.jwt.secretName | string | `""` | |
| secrets.jwt.value | string | `""` | |
| services.consensus.annotations | object | `{}` | |
| services.consensus.clusterIPs | list | `[]` | |
| services.consensus.loadBalancerIPs | list | `[]` | |
| services.consensus.port | int | `50050` | |
| services.consensus.publishNotReadyAddresses | bool | `true` | |
| services.consensus.type | string | `"ClusterIP"` | |
| services.rpc.annotations | object | `{}` | |
| services.rpc.clusterIPs | list | `[]` | |
| services.rpc.loadBalancerIPs | list | `[]` | |
| services.rpc.port | int | `8545` | |
| services.rpc.publishNotReadyAddresses | bool | `true` | |
| services.rpc.type | string | `"ClusterIP"` | |
| statefulset.annotations | object | `{}` | |
| statefulset.podAnnotations | object | `{}` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs). To regenerate run `helm-docs` command at this folder.
19 changes: 19 additions & 0 deletions charts/op-conductor/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}

{{ template "chart.badgesSection" . }}

{{ template "chart.description" . }}

{{ template "chart.homepageLine" . }}

{{ template "chart.maintainersSection" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}

----------------------------------------------
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs). To regenerate run `helm-docs` command at this folder.
6 changes: 6 additions & 0 deletions charts/op-conductor/ci/ct-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
secrets:
# REQUIRED: JWT for communication with op-geth and op-node. In case of multiReplica, comma separated list of JWTs (or shared)
# Either provide the secret name and key or the value directly. If value is not empty, it will have precedence over the secret.
jwt:
value: "0000000000000000000000000000000000000000000000000000000000000001"
62 changes: 62 additions & 0 deletions charts/op-conductor/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "op-conductor.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 "op-conductor.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 version as used by the chart label.
*/}}
{{- define "op-conductor.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "op-conductor.labels" -}}
helm.sh/chart: {{ include "op-conductor.chart" . }}
{{ include "op-conductor.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "op-conductor.selectorLabels" -}}
app.kubernetes.io/name: {{ include "op-conductor.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "op-conductor.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "op-conductor.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions charts/op-conductor/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{- if .Values.secrets.jwt.value }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "op-conductor.fullname" . }}
labels:
{{- include "op-conductor.labels" . | nindent 4 }}
data:
jwt: {{ .Values.secrets.jwt.value | b64enc | quote }}
{{- end }}
50 changes: 50 additions & 0 deletions charts/op-conductor/templates/service-consensus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{{- $replicas := .Values.replicaCount }}
{{ range $index, $e := until (int $replicas) }}
{{- with $.Values.services.consensus }}
{{- $loadBalancerIP := "" }}
{{- $clusterIP := "" }}
{{- if lt $index (len .loadBalancerIPs) }}
{{- $loadBalancerIP = index .loadBalancerIPs $index }}
{{- end }}
{{- if lt $index (len .clusterIPs) }}
{{- $clusterIP = index .clusterIPs $index }}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "op-conductor.fullname" $ }}-consensus-{{ $index }}
{{- with .annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
service-type: consensus
{{- include "op-conductor.labels" $ | nindent 4 }}
spec:
type: {{ .type }}
{{- with $loadBalancerIP }}
loadBalancerIP: {{ . }}
{{- end }}
{{- with $clusterIP }}
clusterIP: {{ . }}
{{- end }}
{{- with .externalTrafficPolicy }}
externalTrafficPolicy: {{ . }}
{{- end }}
{{- with .internalTrafficPolicy }}
internalTrafficPolicy: {{ . }}
{{- end }}
{{- with .publishNotReadyAddresses }}
publishNotReadyAddresses: {{ . }}
{{- end }}
ports:
- name: consensus
port: {{ .port }}
targetPort: consensus
protocol: TCP
selector:
{{- include "op-conductor.selectorLabels" $ | nindent 4 }}
statefulset.kubernetes.io/pod-name: {{ template "op-conductor.fullname" $ }}-{{ $index }}
{{- end }}
{{- end }}
50 changes: 50 additions & 0 deletions charts/op-conductor/templates/service-rpc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{{- $replicas := .Values.replicaCount }}
{{ range $index, $e := until (int $replicas) }}
{{- with $.Values.services.rpc }}
{{- $loadBalancerIP := "" }}
{{- $clusterIP := "" }}
{{- if lt $index (len .loadBalancerIPs) }}
{{- $loadBalancerIP = index .loadBalancerIPs $index }}
{{- end }}
{{- if lt $index (len .clusterIPs) }}
{{- $clusterIP = index .clusterIPs $index }}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "op-conductor.fullname" $ }}-rpc-{{ $index }}
{{- with .annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
service-type: rpc
{{- include "op-conductor.labels" $ | nindent 4 }}
spec:
type: {{ .type }}
{{- with $loadBalancerIP }}
loadBalancerIP: {{ . }}
{{- end }}
{{- with $clusterIP }}
clusterIP: {{ . }}
{{- end }}
{{- with .externalTrafficPolicy }}
externalTrafficPolicy: {{ . }}
{{- end }}
{{- with .internalTrafficPolicy }}
internalTrafficPolicy: {{ . }}
{{- end }}
{{- with .publishNotReadyAddresses }}
publishNotReadyAddresses: {{ . }}
{{- end }}
ports:
- name: rpc
port: {{ .port }}
targetPort: rpc
protocol: TCP
selector:
{{- include "op-conductor.selectorLabels" $ | nindent 4 }}
statefulset.kubernetes.io/pod-name: {{ template "op-conductor.fullname" $ }}-{{ $index }}
{{- end }}
{{- end }}
Loading

0 comments on commit 65f99a0

Please sign in to comment.