Files
zeekayandHanzo Dev ca12a44e51 paas-migrate: register Hanzo services on the PaaS via API (no GHA)
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]>
2026-06-17 04:34:03 +00:00

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 }