-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
put trd report file in a bucket for analysis (#53)
* put trd report file in a bucket for analysis it makes it easy to do development work on TRD and gives users an easy way to access detailed csv payment files bucket names are randomized, and we use workload identity to give bucket write rights to containers. * do not login to kubectl, recursive upload
- Loading branch information
1 parent
c67c24f
commit 47492c3
Showing
7 changed files
with
109 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM google/cloud-sdk:slim | ||
|
||
COPY entrypoint.sh /payout-report-uploader/ | ||
|
||
ENTRYPOINT ["/payout-report-uploader/entrypoint.sh"] | ||
|
||
CMD [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash -x | ||
|
||
find /app/reports | ||
|
||
echo "now rsyncing payout reports to $REPORT_BUCKET_URL" | ||
# workload identity allows this to work | ||
gsutil -m rsync -r /app/reports $REPORT_BUCKET_URL | ||
|
||
echo "Done" | ||
echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: trd-report-uploader | ||
annotations: | ||
iam.gke.io/gcp-service-account: ${kubernetes_name_prefix}-payout-report-uploader@${project}.iam.gserviceaccount.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ spec: | |
spec: | ||
template: | ||
spec: | ||
containers: | ||
initContainers: | ||
- name: trd-payout-cron | ||
args: | ||
- "--run_mode" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters