diff --git a/infra/argo/cockpit-build-deploy.yaml b/infra/argo/cockpit-build-deploy.yaml index 052aa94..d2648fe 100644 --- a/infra/argo/cockpit-build-deploy.yaml +++ b/infra/argo/cockpit-build-deploy.yaml @@ -1,10 +1,9 @@ # Argo WorkflowTemplate — build + deploy the fxhnt cockpit, fully in-cluster. # -# Mirrors foxhunt's proven `build-ci-image` (Kaniko) + `compile-and-deploy` (kubectl) patterns, reusing the -# same cluster primitives: the `argo-workflow` ServiceAccount, the `argo-git-ssh-key` deploy key (clone over -# the in-cluster gitlab-shell), and the `gitlab-registry` dockerconfig (push to the internal registry). The -# build runs in-cluster so it reaches the registry + token endpoint natively — no laptop, no private-CA trust, -# nothing public. +# Reuses cluster primitives: the `argo-workflow` ServiceAccount, the `argo-git-ssh-key` deploy key (clone +# the fxhnt repo over in-cluster Gitea SSH, gitea-sshd:2222), and the `scw-registry` dockerconfig (push to +# the external Scaleway Container Registry rg.fr-par.scw.cloud/bizworx). Build runs in-cluster. +# (Phase 2B: migrated off the in-cluster GitLab shell + registry.) # # Submit: argo submit -n foxhunt --from=wftmpl/fxhnt-cockpit -p commit-sha= --watch # (or use scripts/argo-deploy-cockpit.sh) @@ -50,7 +49,7 @@ spec: chmod 600 /root/.ssh/id_ed25519 printf 'Host *\n StrictHostKeyChecking no\n UserKnownHostsFile /dev/null\n' > /root/.ssh/config git clone --no-checkout --filter=blob:none \ - "ssh://git@gitlab-gitlab-shell.foxhunt.svc.cluster.local:2222/root/fxhnt.git" /workspace/src + "ssh://git@gitea-sshd.foxhunt.svc.cluster.local:2222/gitadmin/fxhnt.git" /workspace/src cd /workspace/src && git checkout "{{workflow.parameters.commit-sha}}" echo "checked out $(git rev-parse --short HEAD)" volumeMounts: @@ -64,11 +63,9 @@ spec: /kaniko/executor \ --context=/workspace/src \ --dockerfile=/workspace/src/infra/docker/fxhnt.Dockerfile \ - --destination=gitlab-registry.foxhunt.svc.cluster.local:5000/root/foxhunt/fxhnt-cockpit:latest \ - --insecure-registry=gitlab-registry.foxhunt.svc.cluster.local:5000 \ - --skip-tls-verify-registry=gitlab-registry.foxhunt.svc.cluster.local:5000 \ + --destination=rg.fr-par.scw.cloud/bizworx/fxhnt-cockpit:latest \ --cache=true \ - --cache-repo=gitlab-registry.foxhunt.svc.cluster.local:5000/root/foxhunt/cache \ + --cache-repo=rg.fr-par.scw.cloud/bizworx/cache \ --snapshot-mode=redo env: - { name: DOCKER_CONFIG, value: /kaniko/.docker } @@ -81,7 +78,7 @@ spec: - { name: git-ssh-key, secret: { secretName: argo-git-ssh-key, defaultMode: 256 } } - name: registry-auth secret: - secretName: gitlab-registry + secretName: scw-registry items: [{ key: .dockerconfigjson, path: config.json }] # --- deploy: apply manifests from the repo + roll the dashboard to the fresh image --- @@ -102,7 +99,7 @@ spec: chmod 600 /root/.ssh/id_ed25519 printf 'Host *\n StrictHostKeyChecking no\n UserKnownHostsFile /dev/null\n' > /root/.ssh/config git clone --no-checkout --filter=blob:none \ - "ssh://git@gitlab-gitlab-shell.foxhunt.svc.cluster.local:2222/root/fxhnt.git" /workspace/src + "ssh://git@gitea-sshd.foxhunt.svc.cluster.local:2222/gitadmin/fxhnt.git" /workspace/src cd /workspace/src && git checkout "{{workflow.parameters.commit-sha}}" volumeMounts: - { name: git-ssh-key, mountPath: /etc/git-ssh, readOnly: true } diff --git a/infra/k8s/jobs/fxhnt-backtest-ingest-job.yaml b/infra/k8s/jobs/fxhnt-backtest-ingest-job.yaml index fc61d6e..3188f6f 100644 --- a/infra/k8s/jobs/fxhnt-backtest-ingest-job.yaml +++ b/infra/k8s/jobs/fxhnt-backtest-ingest-job.yaml @@ -26,10 +26,10 @@ spec: nodeSelector: k8s.scaleway.com/pool-name: platform imagePullSecrets: - - name: gitlab-registry + - name: scw-registry containers: - name: ingest - image: gitlab-registry.foxhunt.svc.cluster.local:5000/root/foxhunt/fxhnt-cockpit:latest + image: rg.fr-par.scw.cloud/bizworx/fxhnt-cockpit:latest # Full pull (no --limit). For a small-batch validation run, use: # args: ["ingest-historical", "--limit", "100"] command: ["fxhnt"] diff --git a/infra/k8s/jobs/fxhnt-backtest-verdict-job.yaml b/infra/k8s/jobs/fxhnt-backtest-verdict-job.yaml index f1a3255..9826a58 100644 --- a/infra/k8s/jobs/fxhnt-backtest-verdict-job.yaml +++ b/infra/k8s/jobs/fxhnt-backtest-verdict-job.yaml @@ -23,10 +23,10 @@ spec: nodeSelector: k8s.scaleway.com/pool-name: platform imagePullSecrets: - - name: gitlab-registry + - name: scw-registry containers: - name: backtest - image: gitlab-registry.foxhunt.svc.cluster.local:5000/root/foxhunt/fxhnt-cockpit:latest + image: rg.fr-par.scw.cloud/bizworx/fxhnt-cockpit:latest command: ["fxhnt"] args: ["backtest-equity", "--pit", "--n", "150", "--trailing-window-months", "12", "--cost-bps", "15", "--delisting-return", "-0.30", "--persist-cockpit", diff --git a/infra/k8s/jobs/fxhnt-factory-cronjob.yaml b/infra/k8s/jobs/fxhnt-factory-cronjob.yaml index 3a5a2b1..fdef0ea 100644 --- a/infra/k8s/jobs/fxhnt-factory-cronjob.yaml +++ b/infra/k8s/jobs/fxhnt-factory-cronjob.yaml @@ -20,10 +20,10 @@ spec: nodeSelector: k8s.scaleway.com/pool-name: platform imagePullSecrets: - - name: gitlab-registry + - name: scw-registry containers: - name: factory - image: gitlab-registry.foxhunt.svc.cluster.local:5000/root/foxhunt/fxhnt-cockpit:latest # set by CI / Kaniko push + image: rg.fr-par.scw.cloud/bizworx/fxhnt-cockpit:latest # set by CI / Kaniko push command: ["sh", "-c"] args: - | diff --git a/infra/k8s/jobs/fxhnt-forward-cronjob.yaml b/infra/k8s/jobs/fxhnt-forward-cronjob.yaml index b48a651..d249cc5 100644 --- a/infra/k8s/jobs/fxhnt-forward-cronjob.yaml +++ b/infra/k8s/jobs/fxhnt-forward-cronjob.yaml @@ -31,10 +31,10 @@ spec: nodeSelector: k8s.scaleway.com/pool-name: platform imagePullSecrets: - - name: gitlab-registry + - name: scw-registry containers: - name: ingest - image: gitlab-registry.foxhunt.svc.cluster.local:5000/root/foxhunt/fxhnt-cockpit:latest # set by CI / Kaniko push + image: rg.fr-par.scw.cloud/bizworx/fxhnt-cockpit:latest # set by CI / Kaniko push command: ["sh", "-c"] args: - | diff --git a/infra/k8s/orchestration/dagster.yaml b/infra/k8s/orchestration/dagster.yaml index 795b4a4..abcf82e 100644 --- a/infra/k8s/orchestration/dagster.yaml +++ b/infra/k8s/orchestration/dagster.yaml @@ -85,7 +85,7 @@ spec: spec: serviceAccountName: tailscale-dagster nodeSelector: { k8s.scaleway.com/pool-name: platform } - imagePullSecrets: [{ name: gitlab-registry }] + imagePullSecrets: [{ name: scw-registry }] initContainers: - name: dagster-home-init # DAGSTER_HOME must be writable; seed it from the configmap image: busybox:1.36 @@ -95,7 +95,7 @@ spec: - { name: dagster-cfg, mountPath: /cfg, readOnly: true } containers: - name: webserver - image: gitlab-registry.foxhunt.svc.cluster.local:5000/root/foxhunt/fxhnt-cockpit:latest + image: rg.fr-par.scw.cloud/bizworx/fxhnt-cockpit:latest command: ["dagster-webserver", "-h", "0.0.0.0", "-p", "3000", "-w", "/dagster-home/workspace.yaml"] env: &dagster_env @@ -117,7 +117,7 @@ spec: - { name: surfer-data, mountPath: /data } resources: { requests: { cpu: 100m, memory: 512Mi }, limits: { cpu: "1", memory: 1Gi } } - name: daemon - image: gitlab-registry.foxhunt.svc.cluster.local:5000/root/foxhunt/fxhnt-cockpit:latest + image: rg.fr-par.scw.cloud/bizworx/fxhnt-cockpit:latest command: ["dagster-daemon", "run", "-w", "/dagster-home/workspace.yaml"] env: *dagster_env volumeMounts: diff --git a/infra/k8s/services/fxhnt-dashboard.yaml b/infra/k8s/services/fxhnt-dashboard.yaml index 6df999b..af102c4 100644 --- a/infra/k8s/services/fxhnt-dashboard.yaml +++ b/infra/k8s/services/fxhnt-dashboard.yaml @@ -21,10 +21,10 @@ spec: nodeSelector: k8s.scaleway.com/pool-name: platform imagePullSecrets: - - name: gitlab-registry + - name: scw-registry containers: - name: cockpit - image: gitlab-registry.foxhunt.svc.cluster.local:5000/root/foxhunt/fxhnt-cockpit:latest + image: rg.fr-par.scw.cloud/bizworx/fxhnt-cockpit:latest command: ["fxhnt", "serve", "--host", "0.0.0.0", "--port", "8080"] # 0.0.0.0 so the kubelet probe (pod IP) + sidecar (localhost) both reach it env: - name: FXHNT_OPERATIONAL_DSN