Skip to content

Commit

Permalink
[helm] sync STRUCT_LOG_TCP_ADDR and azure config for backup
Browse files Browse the repository at this point in the history
Closes: diem#7822
  • Loading branch information
rustielin authored and bors-libra committed Mar 6, 2021
1 parent 486dc12 commit b00b230
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helm/fullnode/files/backup/azure.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ create_for_write = '''
open_for_read = 'azcopy cp --from-to BlobPipe "https://$ACCOUNT.blob.core.windows.net/$CONTAINER/$SUB_DIR/$FILE_HANDLE$SAS" < /dev/null | gzip -cd'
save_metadata_line= 'gzip -c | azcopy cp --from-to PipeBlob "https://$ACCOUNT.blob.core.windows.net/$CONTAINER/$SUB_DIR/metadata/$FILE_NAME$SAS"'
list_metadata_files = '''
(azcopy ls "https://$ACCOUNT.blob.core.windows.net/$CONTAINER/$SUB_DIR/metadata$SAS" ||:) \
| sed -ne "s#INFO: \(.*\); Content Length:.*#metadata/\1#p"
(azcopy ls "https://$ACCOUNT.blob.core.windows.net/$CONTAINER/$SUB_DIR/metadata/$SAS" ||:) \
| sed -ne "s#; .*##;s#INFO: \(.*\)#metadata/\1#p"
'''
4 changes: 4 additions & 0 deletions helm/fullnode/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,7 @@ Create the name of the service account to use
{{ .Values.backup.pushGateway }}
{{- end -}}
{{- end -}}

{{- define "backup.loggingAddress" -}}
{{ .Values.logging.address }}
{{- end -}}
2 changes: 2 additions & 0 deletions helm/fullnode/templates/backup-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ spec:
value: "debug"
- name: RUST_BACKTRACE
value: "1"
- name: STRUCT_LOG_TCP_ADDR
value: {{ include "backup.loggingAddress" $ | quote }}
- name: PUSH_METRICS_ENDPOINT
value: "{{- include "backup.pushGateway" $ }}/metrics/job/{{- .Values.backup_verify.jobName | default "db_backup_verify" }}"
{{- include "backup.backupEnvironment" (dict "config" $.Values.backup.config "era" $.Values.chain.era) | nindent 12 }}
Expand Down
2 changes: 2 additions & 0 deletions helm/fullnode/templates/backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ spec:
value: "debug"
- name: RUST_BACKTRACE
value: "1"
- name: STRUCT_LOG_TCP_ADDR
value: {{ include "backup.loggingAddress" $ | quote }}
{{- if (include "backup.pushGateway" $) }}
- name: PUSH_METRICS_ENDPOINT
value: "{{- include "backup.pushGateway" $ }}/metrics/job/{{- .jobName | default "db_backup" }}"
Expand Down
2 changes: 2 additions & 0 deletions helm/fullnode/templates/restore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ spec:
value: "debug"
- name: RUST_BACKTRACE
value: "1"
- name: STRUCT_LOG_TCP_ADDR
value: {{ include "backup.loggingAddress" $ | quote }}
{{- if (include "backup.pushGateway" $) }}
- name: PUSH_METRICS_ENDPOINT
value: "{{- include "backup.pushGateway" $ }}/metrics/job/{{- .jobName | default "db_restore" }}"
Expand Down

0 comments on commit b00b230

Please sign in to comment.