
{{- $nodeKeys := dict }}
{{- $_ := set $nodeKeys "Validator_0" "eyJwcml2X2tleSI6eyJ0eXBlIjoidGVuZGVybWludC9Qcml2S2V5RWQyNTUxOSIsInZhbHVlIjoibmtUeEJlTm55b2UvR3VSZmVva0RBbWRsSlVaa0dFMWJUMU5nalV3N0lieEs3WEE4RHdybFByMW9YS0s1Nk9VNllOUHZDSXR6T1ZwQm9GSWNyQngvemc9PSJ9fQ==" }}
{{- $_ := set $nodeKeys "Validator_1" "eyJwcml2X2tleSI6eyJ0eXBlIjoidGVuZGVybWludC9Qcml2S2V5RWQyNTUxOSIsInZhbHVlIjoiNTltUUZFbUdGVFpnOHQxa0M5SHljYVpIL3ViWjlEVkd5NHdGWUlOaFh5dEZVYkc4NlZvUFdwTE4rWGU3UGhLODZzODNTQm5WUGw4eitvUXp3RXV0Q2c9PSJ9fQ==" }}
{{- $_ := set $nodeKeys "Validator_2" "eyJwcml2X2tleSI6eyJ0eXBlIjoidGVuZGVybWludC9Qcml2S2V5RWQyNTUxOSIsInZhbHVlIjoiTC9VQkx6eWd4Yk1udmRoM1ltTlJldTVFN2VFSUhUcDdkNGMzeG0ycnhHbUtrbHZidTNPZEZJaUtqRHBIZFQycUN3WDN3dkJzWU41MDRISHpFckEwR0E9PSJ9fQ==" }}
{{- $_ := set $nodeKeys "Validator_3" "eyJwcml2X2tleSI6eyJ0eXBlIjoidGVuZGVybWludC9Qcml2S2V5RWQyNTUxOSIsInZhbHVlIjoiUUIvOUkycCtJQzRwY0pGZWNhY3Q3d2JjMlBsYmI0SjkwVkRlRll0MTIzcE0xWFZpUWg1dWo2K2dsUDhpd0JMNzlQQkdqa051QTRtTnRqOGV6b0djL3c9PSJ9fQ==" }}

{{- $privKeys := dict }}
{{- $_ := set $privKeys "Validator_0" "eyJDdXJ2ZVR5cGUiOiJlZDI1NTE5IiwiQWRkcmVzcyI6Ijc0NDYzMEVBOUE3Q0JEMzEwQUU3QjhFREFGQ0JGOTRFNTREMjNGMzciLCJQ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NjYzNTY2MTA3MUVGNTAwMTlENUFGNkNBNEFGODc4QkY1MjE2QUUyNTgyQUQzOUQ3RjY0NEEzQUFCIiwiQWRkcmVzc0hhc2giOiJnby1jcnlwdG8tMC41LjAiLCJQcml2YXRlS2V5Ijp7IkNyeXB0byI6Im5vbmUiLCJQbGFpbiI6IjIxMzlCQjU4MkE1MDQ1MTAyNjRDMzk0NDQ5ODVDRTREM0JEOTM5OEE0NjA2ODRCQUI1QTI4RjU4QzhFMjQ2QUY4OTEyRjIxNjYzNTY2MTA3MUVGNTAwMTlENUFGNkNBNEFGODc4QkY1MjE2QUUyNTgyQUQzOUQ3RjY0NEEzQUFCIn19" }}
{{- $_ := set $privKeys "Validator_3" "eyJDdXJ2ZVR5cGUiOiJlZDI1NTE5IiwiQWRkcmVzcyI6IkE1QkNBRjc2MUI3NzRBNjFGQURBNjkxQUI0MEM0RTlBMjBEODJCN0IiLCJQdWJsaWNLZXkiOiJFMDA1QTFEOTg5QTk4QjZBNzkxMERBMDZBMzk0MjE1ODY3NkM4M0EwNTdDOThBMDhBOUI1Mjg1RThFOTYwQThCIiwiQWRkcmVzc0hhc2giOiJnby1jcnlwdG8tMC41LjAiLCJQcml2YXRlS2V5Ijp7IkNyeXB0byI6Im5vbmUiLCJQbGFpbiI6IkMyN0U3RjA2MDI0M0QwODg4NzYwNTgxMTgyMzYwNjFEMkZERjlCNjU4MkJCNUU0MTdGOEQ3MTVCRDc1RkU5RUFFMDA1QTFEOTg5QTk4QjZBNzkxMERBMDZBMzk0MjE1ODY3NkM4M0EwNTdDOThBMDhBOUI1Mjg1RThFOTYwQThCIn19" }}

{{- if .Values.chain.testing }}
{{- range $index, $val := $.Values.validators }}
{{- $nodeNumber := printf "%03d" $index }}
---
apiVersion: v1
kind: Secret
metadata:
  labels:
    app: {{ template "burrow.name" $ }}
    chart: {{ template "burrow.chart" $ }}
    heritage: {{ $.Release.Service }}
    release: {{ $.Release.Name }}
    nodeNumber: {{ $nodeNumber | quote }}
  name: {{ template "burrow.fullname" $ }}-keys-{{ $nodeNumber }}
type: Opaque
data:
    {{ printf "%s.json" $val.address }}: {{ index $privKeys ($val.name) }}
    node_key.json: {{ index $nodeKeys ($val.name) }}
{{- end }}
{{- end }}
