diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 2752b05..83f50d1 100755 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -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 }} diff --git a/README.md b/README.md index 2fac0ef..ea3d1d8 100644 --- a/README.md +++ b/README.md @@ -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_.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: diff --git a/k8s/base/deployment.yaml b/k8s/base/deployment.yaml index 594c69a..cdc4a65 100644 --- a/k8s/base/deployment.yaml +++ b/k8s/base/deployment.yaml @@ -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: diff --git a/k8s/secret.properties.template b/k8s/secret.properties.template index 22fc891..6f0fb63 100644 --- a/k8s/secret.properties.template +++ b/k8s/secret.properties.template @@ -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}