apiVersion: external-secrets.io/v1alpha1 kind: ExternalSecret metadata: name: {{ include "optics-agent.fullname" . }}-relayer-external-secret labels: {{- include "optics-agent.labels" . | nindent 4 }} spec: secretStoreRef: name: {{ include "optics-agent.cluster-secret-store.name" . }} kind: ClusterSecretStore refreshInterval: "1h" # The secret that will be created target: name: {{ include "optics-agent.fullname" . }}-relayer-secret template: type: Opaque metadata: labels: {{- include "optics-agent.labels" . | nindent 10 }} data: {{- range .Values.optics.relayer.transactionSigners }} {{- if not (hasKey . "aws") }} OPT_BASE_SIGNERS_{{ .name | upper }}_KEY: {{ printf "'{{ .transaction_signer_%s_key | toString }}'" .name }} {{- end }} {{- end }} data: {{- range .Values.optics.relayer.transactionSigners }} {{- if not (hasKey . "aws") }} - secretKey: {{ printf "transaction_signer_%s_key" .name }} remoteRef: key: {{ printf "optics-key-%s-relayer-signer" $.Values.optics.runEnv }} property: privateKey {{- end }} {{- end }}