diff --git a/k8s/git-commit.yaml b/k8s/git-commit.yaml new file mode 100644 index 0000000..c3b834e --- /dev/null +++ b/k8s/git-commit.yaml @@ -0,0 +1,14 @@ +# This ConfigMap stores the current Git commit hash +# Used by Kustomize to trigger pod rollouts on commit changes +apiVersion: v1 +kind: ConfigMap +metadata: + name: poimen-git-info + namespace: poimen + labels: + app.kubernetes.io/name: poimen + app.kubernetes.io/component: orchestrator +data: + GIT_COMMIT: "c85105e" # Updated automatically by CI/CD + GIT_BRANCH: "main" + DEPLOYMENT_DATE: "2026-08-23" diff --git a/k8s/kustomization.yaml b/k8s/kustomization.yaml index 20aa3f7..86bcc25 100644 --- a/k8s/kustomization.yaml +++ b/k8s/kustomization.yaml @@ -6,6 +6,7 @@ namespace: poimen resources: - orchestrator-job.yaml - worker-deployment.yaml + - git-commit.yaml commonLabels: app.kubernetes.io/name: poimen diff --git a/k8s/orchestrator-job.yaml b/k8s/orchestrator-job.yaml index ce2c713..442f3ce 100644 --- a/k8s/orchestrator-job.yaml +++ b/k8s/orchestrator-job.yaml @@ -14,14 +14,21 @@ spec: containers: - name: orchestrator image: golang:latest + imagePullPolicy: Always # ✅ Force latest image pull workingDir: /app command: ["/bin/sh", "-c"] args: - | + set -e + echo "[$(date)] Starting poimen orchestrator job..." apt-get update && apt-get install -y --no-install-recommends git + echo "[$(date)] Cloning latest code from git..." git clone https://forgejo.riotpiao.com/rock/poimen-workflows.git /app cd /app + echo "[$(date)] Latest commit: $(git rev-parse HEAD)" + echo "[$(date)] Downloading dependencies..." go mod download + echo "[$(date)] Starting orchestrator with T0-T4 complete implementation..." go run ./cmd/starter \ --repo https://forgejo.riotpiao.com/rock/poimen \ --remote file:///tmp/poimen-output \ diff --git a/k8s/worker-deployment.yaml b/k8s/worker-deployment.yaml index c780bd6..b381632 100644 --- a/k8s/worker-deployment.yaml +++ b/k8s/worker-deployment.yaml @@ -12,18 +12,28 @@ spec: metadata: labels: app: poimen-worker + annotations: + git-commit: "c85105e" # ✅ Updated on each push, triggers rolling restart + deployment-date: "2026-08-23" spec: containers: - name: worker image: golang:latest + imagePullPolicy: Always # ✅ Force pull latest image on pod startup workingDir: /app command: ["/bin/sh", "-c"] args: - | + set -e + echo "[$(date)] Starting poimen worker pod..." apt-get update && apt-get install -y --no-install-recommends git + echo "[$(date)] Cloning latest code from git..." git clone https://forgejo.riotpiao.com/rock/poimen-workflows.git /app cd /app + echo "[$(date)] Latest commit: $(git rev-parse HEAD)" + echo "[$(date)] Downloading dependencies..." go mod download + echo "[$(date)] Starting orchestrator worker..." go run ./cmd/worker env: - name: TEMPORAL_NAMESPACE