fix(k8s): update imagePullPolicy to Always in frontoffice-deployment.yaml
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 20m28s
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 20m28s
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user