Skip to content

Commit

Permalink
make oracle schedule be in the .env file
Browse files Browse the repository at this point in the history
  • Loading branch information
yerdua committed Dec 2, 2019
1 parent 9e4e9e5 commit 75d9681
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ CELOTOOL_DOCKER_IMAGE_TAG="celotool-c8e3392aa2ca44ff83b4035700ece5fd12ed2b84"
CELOCLI_STANDALONE_IMAGE_REPOSITORY="gcr.io/celo-testnet/celocli-standalone"
CELOCLI_STANDALONE_IMAGE_TAG="latest"

# Schedule for an oracle deployed via celotool, expressed in crontab syntax
# This schedule is "every 5th minute"
ORACLE_CRON_SCHEDULE="*/5 * * * *"

ORACLE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/oracle"
ORACLE_DOCKER_IMAGE_TAG="development"
ORACLE_DOCKER_IMAGE_TAG="default"

TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_TAG="transaction-metrics-exporter-d3d165a7db548d175cd703c86c20c1657c04368d"
Expand Down
7 changes: 7 additions & 0 deletions .env.alfajores
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ GETH_BOOTNODE_DOCKER_IMAGE_TAG="9575a01c12438e1adc6bb610c891cb5066aaa7aa"
CELOTOOL_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
CELOTOOL_DOCKER_IMAGE_TAG="celotool-552b1accf90404fdcd886670d150af0a5cae116f"

# Schedule for an oracle deployed via celotool, expressed in crontab syntax
# This schedule is "every 5th minute"
ORACLE_CRON_SCHEDULE="*/5 * * * *"

ORACLE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/oracle"
ORACLE_DOCKER_IMAGE_TAG="default"

TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_TAG="transaction-metrics-exporter-552b1accf90404fdcd886670d150af0a5cae116f"

Expand Down
4 changes: 4 additions & 0 deletions .env.baklavastaging
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ CELOTOOL_DOCKER_IMAGE_TAG="celotool-bffefdb9e94a64b6e70a90aab60dd85ca39d7862"
CELOCLI_STANDALONE_IMAGE_REPOSITORY="gcr.io/celo-testnet/celocli-standalone"
CELOCLI_STANDALONE_IMAGE_TAG="0.0.30-beta2"

# Schedule for an oracle deployed via celotool, expressed in crontab syntax
# This schedule is "every 5th minute"
ORACLE_CRON_SCHEDULE="*/5 * * * *"

ORACLE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/oracle"
ORACLE_DOCKER_IMAGE_TAG="baklavastaging"

Expand Down
10 changes: 10 additions & 0 deletions .env.integration
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ GETH_BOOTNODE_DOCKER_IMAGE_TAG="09a217ff58a95214cbc5189c933359707f4fdaf2"
CELOTOOL_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
CELOTOOL_DOCKER_IMAGE_TAG="celotool-5bea6d30cbe6aa4272b32a4d2cfed5567f422ea9"

CELOCLI_STANDALONE_IMAGE_REPOSITORY="gcr.io/celo-testnet/celocli-standalone"
CELOCLI_STANDALONE_IMAGE_TAG="latest"

# Schedule for an oracle deployed via celotool, expressed in crontab syntax
# This schedule is "every 5th minute"
ORACLE_CRON_SCHEDULE="*/5 * * * *"

ORACLE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/oracle"
ORACLE_DOCKER_IMAGE_TAG="default"

TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_TAG="transaction-metrics-exporter-5bea6d30cbe6aa4272b32a4d2cfed5567f422ea9"

Expand Down
1 change: 1 addition & 0 deletions packages/celotool/src/lib/env-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export enum envVar {
NEXMO_KEY = 'NEXMO_KEY',
NEXMO_SECRET = 'NEXMO_SECRET',
NOTIFICATION_SERVICE_FIREBASE_DB = 'NOTIFICATION_SERVICE_FIREBASE_DB',
ORACLE_CRON_SCHEDULE = 'ORACLE_CRON_SCHEDULE',
ORACLE_DOCKER_IMAGE_REPOSITORY = 'ORACLE_DOCKER_IMAGE_REPOSITORY',
ORACLE_DOCKER_IMAGE_TAG = 'ORACLE_DOCKER_IMAGE_TAG',
PROMTOSD_EXPORT_INTERVAL = 'PROMTOSD_EXPORT_INTERVAL',
Expand Down
1 change: 1 addition & 0 deletions packages/celotool/src/lib/oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function helmParameters(celoEnv: string) {
`--set celotool.image.repository=${fetchEnv(envVar.CELOTOOL_DOCKER_IMAGE_REPOSITORY)}`,
`--set celotool.image.tag=${fetchEnv(envVar.CELOTOOL_DOCKER_IMAGE_TAG)}`,
`--set mnemonic="${fetchEnv(envVar.MNEMONIC)}"`,
`--set oracle.cronSchedule="${fetchEnv(envVar.ORACLE_CRON_SCHEDULE)}"`,
`--set oracle.image.repository=${fetchEnv(envVar.ORACLE_DOCKER_IMAGE_REPOSITORY)}`,
`--set oracle.image.tag=${fetchEnv(envVar.ORACLE_DOCKER_IMAGE_TAG)}`,
`--set celocli.nodeUrl=${getFornoUrl(celoEnv)}`,
Expand Down
2 changes: 1 addition & 1 deletion packages/helm-charts/oracle/templates/oracle.cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
release: {{ .Release.Service }}
component: oracle
spec:
schedule: "{{ .Values.oracleSchedule }}"
schedule: "{{ .Values.oracle.cronSchedule }}"
concurrencyPolicy: Forbid
jobTemplate:
spec:
Expand Down
4 changes: 0 additions & 4 deletions packages/helm-charts/oracle/values.yaml

This file was deleted.

0 comments on commit 75d9681

Please sign in to comment.