Skip to content

Commit

Permalink
Always get endpoint and endpoints secrets in helm charts (#3686)
Browse files Browse the repository at this point in the history
### Description

Noticed that the logic used by the key funder's helm chart to decide
whether to fetch endpoint (singular) or endpoints (plural) from secrets
was stale. This is because fallback was introduced later, and the logic
was looking for quorum - so with the key funder config saying we wanted
to use fallback provider, we weren't ever fetching the plural endpoints
from secrets

Imo the branching is a bit unnecessary and prone to becoming stale, so I
removed it so that we just get both secrets from GCP secrets.

Also redeployed key funder to get the correct secrets

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->
  • Loading branch information
tkporter authored May 7, 2024
1 parent cc7e8d9 commit 1cf6cca
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,9 @@ spec:
* to replace the correct value in the created secret.
*/}}
{{- range .Values.hyperlane.chains }}
{{- if or (eq $.Values.hyperlane.connectionType "quorum") (eq $.Values.hyperlane.connectionType "fallback") }}
GCP_SECRET_OVERRIDE_{{ $.Values.hyperlane.runEnv | upper }}_RPC_ENDPOINTS_{{ . | upper }}: {{ printf "'{{ .%s_rpcs | toString }}'" . }}
{{- else }}
GCP_SECRET_OVERRIDE_{{ $.Values.hyperlane.runEnv | upper }}_RPC_ENDPOINT_{{ . | upper }}: {{ printf "'{{ .%s_rpc | toString }}'" . }}
{{- end }}
{{- end }}
{{- if .Values.hyperlane.aws }}
AWS_ACCESS_KEY_ID: {{ print "'{{ .aws_access_key_id | toString }}'" }}
AWS_SECRET_ACCESS_KEY: {{ print "'{{ .aws_secret_access_key | toString }}'" }}
Expand All @@ -51,16 +48,13 @@ spec:
* and associate it with the secret key networkname_rpc.
*/}}
{{- range .Values.hyperlane.chains }}
{{- if or (eq $.Values.hyperlane.connectionType "quorum") (eq $.Values.hyperlane.connectionType "fallback") }}
- secretKey: {{ printf "%s_rpcs" . }}
remoteRef:
key: {{ printf "%s-rpc-endpoints-%s" $.Values.hyperlane.runEnv . }}
{{- else }}
- secretKey: {{ printf "%s_rpc" . }}
remoteRef:
key: {{ printf "%s-rpc-endpoint-%s" $.Values.hyperlane.runEnv . }}
{{- end }}
{{- end }}
{{- if .Values.hyperlane.aws }}
- secretKey: aws_access_key_id
remoteRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@ spec:
* to replace the correct value in the created secret.
*/}}
{{- range .Values.hyperlane.chains }}
{{- if eq $.Values.hyperlane.connectionType "quorum" }}
GCP_SECRET_OVERRIDE_{{ $.Values.hyperlane.runEnv | upper }}_RPC_ENDPOINTS_{{ . | upper }}: {{ printf "'{{ .%s_rpcs | toString }}'" . }}
{{- else }}
GCP_SECRET_OVERRIDE_{{ $.Values.hyperlane.runEnv | upper }}_RPC_ENDPOINT_{{ . | upper }}: {{ printf "'{{ .%s_rpc | toString }}'" . }}
{{- end }}
{{- end }}
data:
- secretKey: deployer_key
remoteRef:
Expand All @@ -43,13 +40,10 @@ spec:
* and associate it with the secret key networkname_rpc.
*/}}
{{- range .Values.hyperlane.chains }}
{{- if eq $.Values.hyperlane.connectionType "quorum" }}
- secretKey: {{ printf "%s_rpcs" . }}
remoteRef:
key: {{ printf "%s-rpc-endpoints-%s" $.Values.hyperlane.runEnv . }}
{{- else }}
- secretKey: {{ printf "%s_rpc" . }}
remoteRef:
key: {{ printf "%s-rpc-endpoint-%s" $.Values.hyperlane.runEnv . }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@ spec:
* to replace the correct value in the created secret.
*/}}
{{- range .Values.hyperlane.chains }}
{{- if eq $.Values.hyperlane.connectionType "quorum" }}
GCP_SECRET_OVERRIDE_{{ $.Values.hyperlane.runEnv | upper }}_RPC_ENDPOINTS_{{ . | upper }}: {{ printf "'{{ .%s_rpcs | toString }}'" . }}
{{- else }}
GCP_SECRET_OVERRIDE_{{ $.Values.hyperlane.runEnv | upper }}_RPC_ENDPOINT_{{ . | upper }}: {{ printf "'{{ .%s_rpc | toString }}'" . }}
{{- end }}
{{- end }}
data:
- secretKey: deployer_key
remoteRef:
Expand All @@ -43,13 +40,10 @@ spec:
* and associate it with the secret key networkname_rpc.
*/}}
{{- range .Values.hyperlane.chains }}
{{- if eq $.Values.hyperlane.connectionType "quorum" }}
- secretKey: {{ printf "%s_rpcs" . }}
remoteRef:
key: {{ printf "%s-rpc-endpoints-%s" $.Values.hyperlane.runEnv . }}
{{- else }}
- secretKey: {{ printf "%s_rpc" . }}
remoteRef:
key: {{ printf "%s-rpc-endpoint-%s" $.Values.hyperlane.runEnv . }}
{{- end }}
{{- end }}

0 comments on commit 1cf6cca

Please sign in to comment.