-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add network selector for tezos reward distributor * add more missing params * introduce dedicated script for trd * proper quoting of env vars * fix typo in dry_run * save more failed jobs * add bucket uploader * add bucket report uploader for trd * make sure 2 diff instances of trd can be deployed in the same ns * manage aws secret key for upload as k8s secret * create an export file for trd bucket upload secrets * fix wrong path
- Loading branch information
1 parent
d36b411
commit b4f14fe
Showing
8 changed files
with
190 additions
and
81 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,9 @@ | ||
#!/bin/sh | ||
|
||
echo "Uploading TRD data to bucket" | ||
|
||
source /trd/cfg/bucket_upload_secrets | ||
if [ ! -z ${BUCKET_NAME} ];then | ||
aws s3 cp --recursive /trd/ s3://${BUCKET_NAME}/${BAKER_NAME} --endpoint $BUCKET_ENDPOINT_URL | ||
fi | ||
sleep 10 |
3 changes: 3 additions & 0 deletions
3
charts/tezos-reward-distributor/scripts/bucket_upload_secrets
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,3 @@ | ||
export AWS_ACCESS_KEY_ID="{{ .Values.bucket_upload_secrets.access_key_id }}" | ||
export AWS_SECRET_ACCESS_KEY="{{ .Values.bucket_upload_secrets.secret_access_key }}" | ||
export AWS_DEFAULT_REGION="{{ .Values.bucket_upload_secrets.default_region }}" |
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,19 @@ | ||
#!/bin/sh | ||
|
||
if [ "${DRY_RUN}" == "false" ]; then | ||
dry_run_arg="" | ||
else | ||
dry_run_arg="--dry_run" | ||
fi | ||
python src/main.py \ | ||
-M 2 \ | ||
--reward_data_provider ${REWARD_DATA_PROVIDER} \ | ||
--node_addr_public ${TEZOS_NODE_ADDR} \ | ||
--node_endpoint ${TEZOS_NODE_ADDR} \ | ||
--base_directory /trd \ | ||
--signer_endpoint ${SIGNER_ADDR} \ | ||
--release_override ${RELEASE_OVERRIDE} \ | ||
--initial_cycle ${INITIAL_CYCLE} \ | ||
-N ${NETWORK} \ | ||
${EXTRA_TRD_ARGS} \ | ||
${dry_run_arg} |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: tezos-reward-distributor-config | ||
name: {{ include "tezos-reward-distributor.fullname" . }}-config | ||
data: | ||
config.yaml: |2+ | ||
{{ toYaml $.Values.trd_config |nindent 4}} |
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: Secret | ||
metadata: | ||
name: {{ include "tezos-reward-distributor.fullname" . }}-secret | ||
data: | ||
bucket_upload_secrets: {{ tpl (.Files.Get "scripts/bucket_upload_secrets") . | b64enc | quote }} |
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