Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRD mainnet adaptations #514

Merged
merged 13 commits into from
Mar 24, 2023
1 change: 1 addition & 0 deletions charts/tezos-reward-distributor/scripts/bucket_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
echo "Uploading TRD data to bucket"

if [ ! -z ${BUCKET_NAME} ];then
export AWS_SECRET_ACCESS_KEY=$(cat /trd/config/aws_secret_access_key)
aws s3 cp --recursive /trd/ s3://${BUCKET_NAME}/${BAKER_NAME} --endpoint $BUCKET_ENDPOINT_URL
fi
sleep 10
6 changes: 6 additions & 0 deletions charts/tezos-reward-distributor/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ spec:
- name: config-volume
configMap:
name: {{ include "tezos-reward-distributor.fullname" . }}-config
- name: secret-volume
secret:
secretName: {{ include "tezos-reward-distributor.fullname" . }}-secret
initContainers:
# Work around a bug where fsGroup is ignored
- name: change-ownership-container
Expand Down Expand Up @@ -83,6 +86,9 @@ spec:
volumeMounts:
- mountPath: /trd
name: storage
- mountPath: /trd/cfg/aws_secret_access_key
name: secret-volume
subPath: aws_secret_access_key
command:
- /bin/sh
args:
Expand Down
6 changes: 6 additions & 0 deletions charts/tezos-reward-distributor/templates/secrets.yaml
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:
AWS_SECRET_ACCESS_KEY: {{ .Values.bucket_upload_secrets.secret_access_key | b64enc }}
3 changes: 2 additions & 1 deletion charts/tezos-reward-distributor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ trd_config:
# when the cronjob is not running.
bucket_upload:
access_key_id:
harryttd marked this conversation as resolved.
Show resolved Hide resolved
secret_access_key:
default_region:
bucket_endpoint_url:
bucket_name:
bucket_upload_secrets:
secret_access_key: