Skip to content

Commit

Permalink
Add role label to nodes in chart (#11817)
Browse files Browse the repository at this point in the history
* Add role label to nodes in chart

* Change back var

* Fix typo

* Implicitly make the first node the bootstrap node to avoid new values
  • Loading branch information
chainchad authored Jan 18, 2024
1 parent 286c8c0 commit 9c22655
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- range $cfg := .Values.chainlink.nodes }}
{{- range $index, $cfg := .Values.chainlink.nodes }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -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 }}
Expand Down

0 comments on commit 9c22655

Please sign in to comment.