From 244fb618fae600d55e69582097ddca3a88458840 Mon Sep 17 00:00:00 2001 From: alvarof2 Date: Tue, 15 Oct 2024 15:10:37 +0200 Subject: [PATCH 1/2] Raft bootstrapand tag --- charts/op-conductor/Chart.yaml | 2 +- charts/op-conductor/templates/statefulset.yaml | 15 ++++++++++----- charts/op-conductor/values.yaml | 4 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/charts/op-conductor/Chart.yaml b/charts/op-conductor/Chart.yaml index 47899dab..92e8fde8 100644 --- a/charts/op-conductor/Chart.yaml +++ b/charts/op-conductor/Chart.yaml @@ -1,7 +1,7 @@ --- name: op-conductor apiVersion: v2 -version: 0.0.4 +version: 0.0.5 description: Helm chart deploying OP Conductor, a HA controller for op-node home: https://clabs.co sources: diff --git a/charts/op-conductor/templates/statefulset.yaml b/charts/op-conductor/templates/statefulset.yaml index 80f86be9..9cdd2e42 100644 --- a/charts/op-conductor/templates/statefulset.yaml +++ b/charts/op-conductor/templates/statefulset.yaml @@ -93,14 +93,15 @@ spec: - -c args: - | - RID=$(echo $HOSTNAME | sed 's/{{ .Release.Name }}-//') datadir="{{ .Values.persistence.mountPath }}" - bootstrap_flag="" - # Check if we're replica 0 and if we need to bootstrap the raft cluster - if [ "$RID" == "0" ] && [ ! -f $datadir/.initialized ]; then + bootstrap_flag="--raft.bootstrap=false" + # Check if we need to bootstrap the raft cluster + {{- if .Values.config.raft.bootstrap }} + if [ ! -d $datadir/{{ .Values.config.raft.server.id }} ]; then bootstrap_flag="--raft.bootstrap=true" fi + {{- end }} exec /usr/local/bin/op-conductor \ --consensus.addr=$(cat $datadir/consensus.addr) \ --consensus.port={{ .Values.config.consensus.port }} \ @@ -127,7 +128,11 @@ spec: --healthcheck.unsafe-interval={{ .Values.config.healthcheck.unsafeInterval }} \ --log.format={{ .Values.config.log.format }} \ --log.level={{ .Values.config.log.level }} \ - --metrics.addr={{ .Values.config.metrics.addr }} \ + {{- if .Values.config.metrics.enabled }} + --metrics.enabled \ + --metrics.addr=0.0.0.0 \ + --metrics.port={{ .Values.config.metrics.port }} \ + {{- end }} {{- if .Values.config.network }} --network={{ .Values.config.network }} \ {{- end }} diff --git a/charts/op-conductor/values.yaml b/charts/op-conductor/values.yaml index ea0a8190..b94fda9a 100644 --- a/charts/op-conductor/values.yaml +++ b/charts/op-conductor/values.yaml @@ -11,7 +11,7 @@ init: image: repository: us-west1-docker.pkg.dev/blockchaintestsglobaltestnet/dev-images/op-conductor - tag: dev + tag: ea8d7ce5425edb3d1adcf0a8bb2a98fcdb21b3e0 pullPolicy: IfNotPresent statefulset: annotations: {} @@ -29,7 +29,7 @@ config: addr: "" port: 50050 raft: - # bootstrap: false + bootstrap: false server: id: 1 storage: From 16b57644f7ef70c2724c7c3eb3833289fc0ee00b Mon Sep 17 00:00:00 2001 From: alvarof2 Date: Tue, 15 Oct 2024 13:16:05 +0000 Subject: [PATCH 2/2] [Automatic] - Update chart README.md --- charts/op-conductor/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/op-conductor/README.md b/charts/op-conductor/README.md index ea7654eb..08c288d6 100644 --- a/charts/op-conductor/README.md +++ b/charts/op-conductor/README.md @@ -1,6 +1,6 @@ # op-conductor -![Version: 0.0.4](https://img.shields.io/badge/Version-0.0.4-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) +![Version: 0.0.5](https://img.shields.io/badge/Version-0.0.5-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 @@ -40,6 +40,7 @@ Helm chart deploying OP Conductor, a HA controller for op-node | 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"` | | @@ -48,7 +49,7 @@ Helm chart deploying OP Conductor, a HA controller for op-node | config.rpc.port | int | `8545` | | | image.pullPolicy | string | `"IfNotPresent"` | | | image.repository | string | `"us-west1-docker.pkg.dev/blockchaintestsglobaltestnet/dev-images/op-conductor"` | | -| image.tag | string | `"dev"` | | +| image.tag | string | `"ea8d7ce5425edb3d1adcf0a8bb2a98fcdb21b3e0"` | | | init.image.pullPolicy | string | `"IfNotPresent"` | | | init.image.repository | string | `"alpine"` | | | init.image.tag | float | `3.19` | |