Skip to content

Commit

Permalink
feat: use env var instead of secrets in config files (#109)
Browse files Browse the repository at this point in the history
* feat: use env var instead of secrets in config files

* remove comment
  • Loading branch information
sbaizet-ledger authored Aug 28, 2024
1 parent 0484bb2 commit e65afe6
Show file tree
Hide file tree
Showing 18 changed files with 276 additions and 261 deletions.
2 changes: 1 addition & 1 deletion charts/bridge-history-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Kubernetes: `>=1.22.0-0`
| global.nameOverride | string | `"bridge-history-api"` | |
| image.pullPolicy | string | `"Always"` | |
| image.repository | string | `"scrolltech/bridgehistoryapi-api"` | |
| image.tag | string | `"v4.4.14"` | |
| image.tag | string | `"v4.4.57"` | |
| ingress.main.annotations | object | `{}` | |
| ingress.main.enabled | bool | `true` | |
| ingress.main.hosts[0].host | string | `"bridge-history-api.scrollsdk"` | |
Expand Down
2 changes: 1 addition & 1 deletion charts/bridge-history-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ controller:
image:
repository: scrolltech/bridgehistoryapi-api
pullPolicy: Always
tag: v4.4.14
tag: v4.4.57

command:
[
Expand Down
19 changes: 19 additions & 0 deletions charts/bridge-history-api/values/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ global:
controller:
replicas: 2

envFrom:
- secretRef:
name: bridge-history-api-secret-env

# TODO make this consistent with devnet, we should use bridge-history-api-config instead of bridge-history-config
persistence:
bridge-history-api:
Expand All @@ -27,3 +31,18 @@ ingress:
paths:
- path: /
pathType: Prefix

externalSecrets:
bridge-history-api-secret-env:
provider: aws
data:
- remoteRef:
key: scroll/bridge-history-api-secret-env
property: SCROLL_BRIDGE_HISTORY_DB_DSN
secretKey: SCROLL_BRIDGE_HISTORY_DB_DSN
- remoteRef:
key: scroll/bridge-history-api-env
property: SCROLL_BRIDGE_HISTORY_REDIS_PASSWORD
secretKey: SCROLL_BRIDGE_HISTORY_REDIS_PASSWORD
refreshInterval: 2m
serviceAccount: external-secrets
2 changes: 1 addition & 1 deletion charts/bridge-history-fetcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Kubernetes: `>=1.22.0-0`
| global.nameOverride | string | `"bridge-history-fetcher"` | |
| image.pullPolicy | string | `"Always"` | |
| image.repository | string | `"scrolltech/bridgehistoryapi-fetcher"` | |
| image.tag | string | `"v4.4.14"` | |
| image.tag | string | `"v4.4.57"` | |
| initContainers.1-check-postgres-connection.args[0] | string | `"postgresql"` | |
| initContainers.1-check-postgres-connection.args[1] | string | `"$(DATABASE_URL)"` | |
| initContainers.1-check-postgres-connection.args[2] | string | `"--timeout"` | |
Expand Down
2 changes: 1 addition & 1 deletion charts/bridge-history-fetcher/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ controller:
image:
repository: scrolltech/bridgehistoryapi-fetcher
pullPolicy: Always
tag: v4.4.14
tag: v4.4.57

command:
[
Expand Down
10 changes: 7 additions & 3 deletions charts/bridge-history-fetcher/values/production.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
global:
isStandalone: true

envFrom:
- secretRef:
name: bridge-history-fetcher-secret-env

persistence:
# TODO make this consistent with devnet, we should use bridge-history-fetcher-config instead of bridge-history-config
bridge-history-fetcher:
Expand All @@ -20,7 +24,7 @@ initContainers:
image: atkrad/wait4x:latest
args:
- postgresql
- $(DATABASE_URL)
- $(SCROLL_BRIDGE_HISTORY_DB_DSN)
- --timeout
- "0"
envFrom:
Expand Down Expand Up @@ -51,8 +55,8 @@ externalSecrets:
data:
- remoteRef:
key: scroll/bridge-history-fetcher-secret-env
property: DATABASE_URL
secretKey: DATABASE_URL
property: SCROLL_BRIDGE_HISTORY_DB_DSN
secretKey: SCROLL_BRIDGE_HISTORY_DB_DSN
refreshInterval: 2m
serviceAccount: external-secrets
bridge-history-fetcher-migrate-db:
Expand Down
25 changes: 18 additions & 7 deletions charts/coordinator-api/README.md

Large diffs are not rendered by default.

Loading

0 comments on commit e65afe6

Please sign in to comment.