Closed 0xavi0 closed 5 days ago
Tested with the following GitRepo
apiVersion: fleet.cattle.io/v1alpha1
kind: GitRepo
metadata:
name: sample
namespace: fleet-local
spec:
repo: "https://github.com/rancher/fleet-test-data"
branch: master
paths:
- multiple-paths
and the following bash script:
#!/bin/bash
i=1
while true
do
echo "---------------------------"
kubectl apply -f test-2586.yaml
OUT=""
while [ "$OUT" != "2" ];
do
OUT=`kubectl get gitrepo sample -n fleet-local -o jsonpath='{.status.summary.ready}'`
done
kubectl delete gitrepo sample -n fleet-local
kubectl wait --for=delete gitrepo/sample --timeout=60s -n fleet-local
kubectl get bundles -A
BUNDLES_LEFT=`kubectl get bundles -A | grep sample | wc -l`
if [ "$BUNDLES_LEFT" == " 0" ];
then
echo "ALL GOOD attempt number: ${i}"
echo "---------------------------"
i=$(($i+1))
else
echo "FAILED"
echo "---------------------------"
exit 1
fi
done
When testing https://github.com/rancher/fleet/issues/2586 the
Bundle
reconciler found that theBundle
was gone as was trying to delete the sameBundleDeployments
in parallel.Deleting the
Bundle
after deleting all itsBundleDeployments
seems to help to prevent that race condition between both reconcilersRefers to: https://github.com/rancher/fleet/issues/2586