Skip to content

Commit

Permalink
Merge pull request #84 from 0xAurelius/switch-klima-price-to-base
Browse files Browse the repository at this point in the history
Switch KLIMA price bot to Aero
  • Loading branch information
0xAurelius authored Oct 28, 2024
2 parents 8a95785 + 5c3f85d commit aa26724
Show file tree
Hide file tree
Showing 10 changed files with 883 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }}
WEB3_PROVIDER_ETH_URL: ${{ secrets.WEB3_PROVIDER_ETH_URL }}
WEB3_PROVIDER_POLYGON_URL: ${{ secrets.WEB3_PROVIDER_POLYGON_URL }}
WEB3_PROVIDER_BASE_URL: ${{ secrets.WEB3_PROVIDER_BASE_URL }}
DISCORD_BOT_TOKEN_REBASE: ${{ secrets.DISCORD_BOT_TOKEN_REBASE }}
DISCORD_BOT_WEBHOOK_REBASE: ${{ secrets.DISCORD_BOT_WEBHOOK_REBASE }}
DISCORD_BOT_TOKEN_DAO_FEE: ${{ secrets.DISCORD_BOT_TOKEN_DAO_FEE }}
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ These variables must also be defined, and will be used to replace variables in t
- `DISCORD_BOT_TOKEN_STAKING_REWARDS`
- `DISCORD_BOT_TOKEN_CCO2_PRICE`

**NOTE: in order for environment variables defined as GitHub Actions Secrets/Variables to be propagated properly from GitHub Actions into the deployed Docker containers, they must be mapped in several places:**
1. Into the build environment via the `.github/workflows/deploy.yaml` file `env` section of the `Deploy` step
1. Into the k8s build via `k8s/secret.properties.template`
1. Into the actual k8s secret via `k8s/base/deployment.yaml` or the corresponding bot-specific `deployment_set_<bot_name>.yaml` file in the appropriate bot-specific directory under `k8s`


#### Digital Ocean App Platform

The above environment variables are used in the Digital Ocean App Platform environment. They are injected into the `app-spec.yml` file for the following reasons:
Expand Down
5 changes: 5 additions & 0 deletions k8s/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ spec:
secretKeyRef:
name: discord-bots-secret
key: WEB3_PROVIDER_POLYGON_URL
- name: WEB3_PROVIDER_BASE_URL
valueFrom:
secretKeyRef:
name: discord-bots-secret
key: WEB3_PROVIDER_BASE_URL
- name: POLYGONSCAN_API_KEY
valueFrom:
secretKeyRef:
Expand Down
1 change: 1 addition & 0 deletions k8s/secret.properties.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ DISCORD_BOT_TOKEN_RETIREMENT_FEE_INFO=${DISCORD_BOT_TOKEN_RETIREMENT_FEE_INFO}
POLYGONSCAN_API_KEY=${POLYGONSCAN_API_KEY}
WEB3_PROVIDER_ETH_URL=${WEB3_PROVIDER_ETH_URL}
WEB3_PROVIDER_POLYGON_URL=${WEB3_PROVIDER_POLYGON_URL}
WEB3_PROVIDER_BASE_URL=${WEB3_PROVIDER_BASE_URL}
GRAPH_API_KEY=${GRAPH_API_KEY}
Loading

0 comments on commit aa26724

Please sign in to comment.