This simple Python project is a Sync Job for Currency Exchange Rates
- Dockerfile: Dockerfile
- Docker Compose: compose.yaml
- Container Registries:
- Docker Hub:
aneeshneelam/currency-exchange-sync - In-cluster registry:
macstation-ubuntu-1.local:30500/currency-exchange-sync(kubelet:container-registry.container-registry.svc.cluster.local:5000/currency-exchange-sync)
- Docker Hub:
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag macstation-ubuntu-1.local:30500/currency-exchange-sync:2.3-prod \
--tag macstation-ubuntu-1.local:30500/currency-exchange-sync:latest \
--tag aneeshneelam/currency-exchange-sync:2.3-prod \
--tag aneeshneelam/currency-exchange-sync:latest \
--push .The schema is managed manually via DDL, not by the ORM.
- DDL: ddl.sql
Run the DDL against the target database before deploying:
kubectl -n postgresql port-forward svc/pg-cluster-rw 5432:5432 &
PGPASSWORD=$(kubectl -n postgresql get secret currencyexchangeratessync-db-credentials \
-o jsonpath='{.data.password}' | base64 -d) \
psql -h localhost -U currencyexchangeratessync -d currency_exchange_rates -f ddl.sqlpg_dump -h <OLD_HOST> -U <OLD_USER> -d <OLD_DB> --data-only -t exchange_rates | \
PGPASSWORD=$(kubectl -n postgresql get secret currencyexchangeratessync-db-credentials \
-o jsonpath='{.data.password}' | base64 -d) \
psql -h localhost -U currencyexchangeratessync -d currency_exchange_rates- Readme: README.Helm.md
- Chart: currency-exchange-sync
Secrets are managed outside of Helm (not committed to git).
currencyexchangeratessync-db-credentials — replicated from the postgresql namespace. Contains keys: username, database, password.
kubectl -n currency-exchange-rates-sync get secret currencyexchangeratessync-db-credentialscurrency-exchange-rates-sync-secrets — created manually. Contains keys: exchangeRatesAPIKey, rollbarToken, sentryDsn.
kubectl -n currency-exchange-rates-sync create secret generic currency-exchange-rates-sync-secrets \
--from-literal=exchangeRatesAPIKey='<API_KEY>' \
--from-literal=rollbarToken='<ROLLBAR_TOKEN>' \
--from-literal=sentryDsn='<SENTRY_DSN>'