From 8766c29a5a5c6d64c7619877e887174b8b7db28d Mon Sep 17 00:00:00 2001 From: masoodafar-web Date: Fri, 19 Jun 2026 00:13:02 +0330 Subject: [PATCH] fix(k8s): update imagePullPolicy to Always in frontoffice-deployment.yaml Changed the imagePullPolicy for the frontoffice container to Always to ensure that the latest image is always pulled from the registry during deployment, improving the consistency of the application updates. Additionally, added a cleanup step in the kub-deploy workflow to remove the latest image from the local cache after deployment. --- .gitea/workflows/kub-deploy.yml | 1 + k8s/staging/frontoffice-deployment.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/kub-deploy.yml b/.gitea/workflows/kub-deploy.yml index 4f58900..7084740 100644 --- a/.gitea/workflows/kub-deploy.yml +++ b/.gitea/workflows/kub-deploy.yml @@ -74,6 +74,7 @@ jobs: # Apply manifests and restart sshpass -e ssh -o StrictHostKeyChecking=no root@${{ env.K8S_SERVER }} " kubectl apply -f /tmp/frontoffice-deployment.yaml && + crictl rmi ${REGISTRY}/${IMAGE_NAME}:latest 2>/dev/null || true && kubectl rollout restart deployment/frontoffice && kubectl rollout status deployment/frontoffice --timeout=180s && rm -f /tmp/frontoffice-deployment.yaml diff --git a/k8s/staging/frontoffice-deployment.yaml b/k8s/staging/frontoffice-deployment.yaml index cc82fd4..989e9a2 100644 --- a/k8s/staging/frontoffice-deployment.yaml +++ b/k8s/staging/frontoffice-deployment.yaml @@ -21,7 +21,7 @@ spec: containers: - name: frontoffice image: 194.5.195.53:30080/admin/frontoffice:latest - imagePullPolicy: IfNotPresent + imagePullPolicy: Always ports: - containerPort: 80 name: http