From c2b403b9cff7dfffed1d4959f3770c800915df0b Mon Sep 17 00:00:00 2001 From: chainchad <96362174+chainchad@users.noreply.github.com> Date: Thu, 18 Jan 2024 15:46:20 -0500 Subject: [PATCH] Implicitly make the first node the bootstrap node to avoid new values --- .../templates/chainlink-node-deployment.yaml | 8 ++++---- charts/chainlink-cluster/values.yaml | 6 ------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/charts/chainlink-cluster/templates/chainlink-node-deployment.yaml b/charts/chainlink-cluster/templates/chainlink-node-deployment.yaml index c3e030c7507..884cf0e535b 100644 --- a/charts/chainlink-cluster/templates/chainlink-node-deployment.yaml +++ b/charts/chainlink-cluster/templates/chainlink-node-deployment.yaml @@ -1,4 +1,4 @@ -{{- range $cfg := .Values.chainlink.nodes }} +{{- range $index, $cfg := .Values.chainlink.nodes }} apiVersion: apps/v1 kind: Deployment metadata: @@ -18,10 +18,10 @@ spec: app: {{ $.Release.Name }} instance: {{ $cfg.name }} release: {{ $.Release.Name }} - # Role value should either be: bootstrap or node. + # Used for testing. Role value should either be: bootstrap or node. # There should only be one "bootstrap" node, the rest should be "node". - # This is used for testing. - role: {{ $cfg.role }} + # Here we set the first node to be bootstrap, the rest to be node. + role: {{ if eq $index 0 }}bootstrap{{ else }}node{{ end }} {{- range $key, $value := $.Values.labels }} {{ $key }}: {{ $value | quote }} {{- end }} diff --git a/charts/chainlink-cluster/values.yaml b/charts/chainlink-cluster/values.yaml index 0b20974b21b..9394bda1213 100644 --- a/charts/chainlink-cluster/values.yaml +++ b/charts/chainlink-cluster/values.yaml @@ -24,7 +24,6 @@ chainlink: p2p_port: 6690 nodes: - name: node-1 - role: bootstrap image: "public.ecr.aws/chainlink/chainlink:latest" # default resources are 300m/1Gi # first node need more resources to build faster inside container @@ -69,15 +68,10 @@ chainlink: # or use overridesToml to override some part of configuration # overridesToml: | - name: node-2 - role: node - name: node-3 - role: node - name: node-4 - role: node - name: node-5 - role: node - name: node-6 - role: node resources: requests: cpu: 350m