Skip to content

Commit

Permalink
Add secret mounting for Graph API key
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAurelius committed May 9, 2024
1 parent b0c4628 commit 765abc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ jobs:
env:
PREFECT_API_KEY: ${{ secrets.PREFECT_API_KEY }}
PREFECT_API_URL: ${{ secrets.PREFECT_API_URL }}
GRAPH_API_KEY: ${{ secrets.GRAPH_API_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.DIGITALOCEAN_SPACES_API_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_API_SECRET }}
WEB3_INFURA_PROJECT_ID: ${{ secrets.WEB3_INFURA_PROJECT_ID }}
Expand Down Expand Up @@ -114,7 +115,7 @@ jobs:
- name: Update deployment file with image
run: sed -i 's|<IMAGE>|'${DOCKER_IMAGE}'|' $GITHUB_WORKSPACE/agent/k8s/base/deployment.yaml
- name: Write secrets file
run: $GITHUB_WORKSPACE/scripts/properties_from_env.sh PREFECT_API_KEY PREFECT_API_URL AWS_SECRET_ACCESS_KEY AWS_ACCESS_KEY_ID PREFECT_POOL WEB3_INFURA_PROJECT_ID > $GITHUB_WORKSPACE/agent/k8s/secret.properties
run: $GITHUB_WORKSPACE/scripts/properties_from_env.sh PREFECT_API_KEY PREFECT_API_URL AWS_SECRET_ACCESS_KEY AWS_ACCESS_KEY_ID PREFECT_POOL WEB3_INFURA_PROJECT_ID GRAPH_API_KEY > $GITHUB_WORKSPACE/agent/k8s/secret.properties
- name: Save DigitalOcean kubeconfig with short-lived credentials
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 ${{ secrets.DIGITALOCEAN_CLUSTER_NAME }}
- name: Deploy to DigitalOcean Kubernetes
Expand Down
5 changes: 5 additions & 0 deletions agent/k8s/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,8 @@ spec:
secretKeyRef:
name: data-pipelines-secrets
key: WEB3_INFURA_PROJECT_ID
- name: GRAPH_API_KEY
valueFrom:
secretKeyRef:
name: data-pipelines-secrets
key: GRAPH_API_KEY

0 comments on commit 765abc5

Please sign in to comment.