-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update reset jobs making them recreatable (#102)
Signed-off-by: Matt Halder <[email protected]>
- Loading branch information
1 parent
30adb61
commit f11e88c
Showing
1 changed file
with
37 additions
and
24 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 |
---|---|---|
@@ -1,39 +1,52 @@ | ||
{{- if .Values.reset.previewnet_reset.enabled }} | ||
apiVersion: batch/v1 | ||
kind: Job | ||
kind: CronJob | ||
metadata: | ||
name: {{ printf "%s-%s" .Chart.Name "prvw-reset-job" | trimSuffix "-"| trunc 52 }} | ||
spec: | ||
# activeDeadlineSeconds: 600 ## this is used to termanate the job after 10 minutes. How long does it take to reset and shoud this be set? | ||
# backoffLimit: 0 # Number of failed retries before considering a Job as failed. Defaults to 6 if not set. Should this be set to 0? How many failures are acceptable? | ||
template: | ||
concurrencyPolicy: Forbid | ||
# This is purposely set to a date known to never exist. This should only be run via manual trigger, never by time based trigger | ||
schedule: "0 0 31 2 *" | ||
jobTemplate: | ||
spec: | ||
containers: | ||
- name: reset | ||
image: "{{ .Values.reset.image.repository }}:{{ .Values.reset.image.tag }}" | ||
imagePullPolicy: {{ .Values.reset.image.pullPolicy }} | ||
command: | ||
- /bin/sh | ||
- -c | ||
- https://raw.githubusercontent.com/hashgraph/hedera-sourcify/main/scripts/hedera-reset.sh ; chmod +x hedera-reset.sh ; ./hedera-reset.sh previewnet | ||
backoffLimit: 0 | ||
template: | ||
spec: | ||
serviceAccountName: {{ template "sourcify.serverRepository.serviceAccountName" . }} | ||
restartPolicy: Never | ||
containers: | ||
- name: reset | ||
image: "{{ .Values.reset.image.repository }}:{{ .Values.reset.image.tag }}" | ||
imagePullPolicy: {{ .Values.reset.image.pullPolicy }} | ||
command: | ||
- /bin/sh | ||
- -c | ||
- wget https://raw.githubusercontent.com/hashgraph/hedera-sourcify/main/scripts/hedera-reset.sh ; chmod +x hedera-reset.sh ; ./hedera-reset.sh previewnet | ||
{{- end }} | ||
|
||
--- | ||
{{- if .Values.reset.testnet_reset.enabled }} | ||
apiVersion: batch/v1 | ||
kind: Job | ||
kind: CronJob | ||
metadata: | ||
name: {{ printf "%s-%s" .Chart.Name "tsnt-reset-job" | trimSuffix "-"| trunc 52 }} | ||
spec: | ||
# activeDeadlineSeconds: 600 ## this is used to termanate the job after 10 minutes. How long does it take to reset and shoud this be set? | ||
# backoffLimit: 0 # Number of failed retries before considering a Job as failed. Defaults to 6 if not set. Should this be set to 0? How many failures are acceptable? | ||
template: | ||
concurrencyPolicy: Forbid | ||
# This is purposely set to a date known to never exist. This should only be run via manual trigger, never by time based trigger | ||
schedule: "0 0 31 2 *" | ||
jobTemplate: | ||
spec: | ||
containers: | ||
- name: reset | ||
image: "{{ .Values.reset.image.repository }}:{{ .Values.reset.image.tag }}" | ||
imagePullPolicy: {{ .Values.reset.image.pullPolicy }} | ||
command: | ||
- /bin/sh | ||
- -c | ||
- https://raw.githubusercontent.com/hashgraph/hedera-sourcify/main/scripts/hedera-reset.sh ; chmod +x hedera-reset.sh ; ./hedera-reset.sh testnet | ||
backoffLimit: 0 | ||
template: | ||
spec: | ||
serviceAccountName: {{ template "sourcify.serverRepository.serviceAccountName" . }} | ||
restartPolicy: Never | ||
containers: | ||
- name: reset | ||
image: "{{ .Values.reset.image.repository }}:{{ .Values.reset.image.tag }}" | ||
imagePullPolicy: {{ .Values.reset.image.pullPolicy }} | ||
command: | ||
- /bin/sh | ||
- -c | ||
- wget https://raw.githubusercontent.com/hashgraph/hedera-sourcify/main/scripts/hedera-reset.sh ; chmod +x hedera-reset.sh ; ./hedera-reset.sh testnet | ||
{{- end }} |