06/03/2022, 4:53 PM
Hey everyone, I have hit a snag and could use some help or input. So I am managing several clusters with Rancher V 2.6.2 and Fleet V0.3.7. Every cluster is running k3sOS v1.21.5+k3s2. I have had numerous successful deployments with fleet starting from a clean cluster and importing it using the generic template. Stand up cluster in rancher import generic -- add label for cluster group once the cluster finishes it's check in fleet takes over and deploys. On this particular cluster, I started getting a "namespace" not found error on my first bundle. This is particularly strange because the namespace yaml is present in that bundle. We are using k8s resource files directly, and with overlays we have not had a need to migrate to Helm. It seems that Fleet is taking the resource files and applying them as Helm manifests; if this is the case then Helm should see the namespaces and apply that first. and I would assume that Fleet would be treating the bundle as a helm manifest. If Fleet is applying the resources in one go, then k8s should see the namespace manifest and apply it first. If I go in and try to force upgrade in rancher or delete the helm deployment state it keeps getting back to this same state of not being able to find the namespace, retrying several times, and then just giving up with a "no deployed releases" on the bundle.


06/04/2022, 6:20 PM
Disclaimer I dont work for Rancher - but I remember having a similar issue and if I recall correctly it appears when I specified a namespace in the Fleet config. I.e. if you specify a target namespace as abc it expects that namespace to be created before it will deploy anything - otherwise it will respect the manifests like you mentioned


06/07/2022, 7:13 PM
Yea that's following the normal order of operations. What I am trying to figure out is if each bundle gets wrapped up in a Helm manifest and deployed then Helm should see that I have namespace charts defined and deploy those first based on Helm's execution order of operations. The other thing that's wild here is that it worked exactly as I assumed it would work previously. Meaning that the namespace charts were found and deployed first by fleet in this particular bundle.