From 7b60fd5f8636ce144abbbc04631328993c942e60 Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Thu, 5 Mar 2026 23:11:55 +0100 Subject: [PATCH] fix(ci): Docker build uses init container + emptyDir instead of PVC The build-ci-image template used volumeClaimTemplates (PVC) which weren't inherited when called via templateRef from ci-pipeline. Restructured to single pod: init container (alpine/git) clones repo into emptyDir, main container (kaniko) builds and pushes image from the same volume. No PVC needed, works correctly via templateRef. Tested: foxhunt-runtime image rebuilt successfully with kubectl. Co-Authored-By: Claude Opus 4.6 --- infra/k8s/argo/build-ci-image-template.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/infra/k8s/argo/build-ci-image-template.yaml b/infra/k8s/argo/build-ci-image-template.yaml index 1079b39cf..0449687d7 100644 --- a/infra/k8s/argo/build-ci-image-template.yaml +++ b/infra/k8s/argo/build-ci-image-template.yaml @@ -75,12 +75,12 @@ spec: mountPath: /workspace args: - | - set -e - mkdir -p ~/.ssh - cp /etc/git-ssh/ssh-privatekey ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - printf 'Host *\n StrictHostKeyChecking no\n UserKnownHostsFile /dev/null\n' > ~/.ssh/config - chmod 600 ~/.ssh/config + set -ex + mkdir -p /root/.ssh + cp /etc/git-ssh/ssh-privatekey /root/.ssh/id_ed25519 + chmod 600 /root/.ssh/id_ed25519 + printf 'Host *\n StrictHostKeyChecking no\n UserKnownHostsFile /dev/null\n' > /root/.ssh/config + chmod 600 /root/.ssh/config SHA="{{inputs.parameters.commit-sha}}" REPO="ssh://git@gitlab-gitlab-shell.foxhunt.svc.cluster.local:2222/root/foxhunt.git"