From 9c22655006bf58422556840dca234a18d82eacd2 Mon Sep 17 00:00:00 2001 From: chainchad <96362174+chainchad@users.noreply.github.com> Date: Thu, 18 Jan 2024 15:57:26 -0500 Subject: [PATCH] Add role label to nodes in chart (#11817) * Add role label to nodes in chart * Change back var * Fix typo * Implicitly make the first node the bootstrap node to avoid new values --- .../templates/chainlink-node-deployment.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/chainlink-cluster/templates/chainlink-node-deployment.yaml b/charts/chainlink-cluster/templates/chainlink-node-deployment.yaml index 16156ef4ffc..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,6 +18,10 @@ spec: app: {{ $.Release.Name }} instance: {{ $cfg.name }} release: {{ $.Release.Name }} + # Used for testing. Role value should either be: bootstrap or node. + # There should only be one "bootstrap" node, the rest should be "node". + # 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 }}