mirror of
https://github.com/hanzoai/paas-migrate.git
synced 2026-10-30 18:25:17 +00:00
migrate.py drives the platform.hanzo.ai API (x-api-key): project.create -> application.create -> save git provider + build type + env -> deploy, per services.yaml. In-cluster Job variant keeps the token inside the cluster. Seeded with drive/audit/sqlite3; extend services.yaml per universe. Co-authored-by: Hanzo Dev <[email protected]>
22 lines
783 B
YAML
22 lines
783 B
YAML
# Run the migration in-cluster; the API key comes from a Secret you create:
|
|
# kubectl -n hanzo create secret generic paas-migrate --from-literal=apiKey=<KEY>
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata: { name: paas-migrate, namespace: hanzo }
|
|
spec:
|
|
backoffLimit: 1
|
|
ttlSecondsAfterFinished: 600
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
containers:
|
|
- name: migrate
|
|
image: python:3.12-slim
|
|
command: ["sh","-c","pip install -q pyyaml && python3 /work/migrate.py /work/services.yaml"]
|
|
env:
|
|
- { name: X_API_KEY, valueFrom: { secretKeyRef: { name: paas-migrate, key: apiKey } } }
|
|
volumeMounts: [{ name: work, mountPath: /work }]
|
|
volumes:
|
|
- name: work
|
|
configMap: { name: paas-migrate-src }
|