https://rancher.com/ logo
#fleet
Title
# fleet
r

rapid-jelly-9995

06/24/2022, 12:42 PM
Hi! I am trying to use fleet with kustomize. One of my kustomization looks something like this:
Copy code
apiVersion: <http://kustomize.config.k8s.io/v1beta1|kustomize.config.k8s.io/v1beta1>
kind: Kustomization
namespace: kubeedge
resources:
  - namespace.yaml
  - <https://github.com/edgefarm/edgefarm.core/manifests/kubeedge/cloudcore/?ref=v1.0.0-beta.5>
patches:
 - ./patch-cloudcore-node-affinity.yaml
However, i get the error:
Copy code
error while running post render on files: accumulating resources: accumulation err='accumulating resources from '../../../../edgefarm.core': 'edgefarm.core' must resolve to a file': recursed accumulation of path 'edgefarm.core': accumulating resources: accumulation err='accumulating resources from '<https://github.com/edgefarm/edgefarm.core/manifests/kubeedge/cloudcore/?ref=v1.0.0-beta.5>': yaml: line 166: mapping values are not allowed in this context': no 'git' program on path: exec: "git": executable file not found in $PATH
It seems that fleet does not understand how to handle the remote target (https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md). Building this using kustomize works just fine:
Copy code
kustomize build . --enable-helm
Does anyone has an idea to get this working?
e

early-rocket-98507

06/24/2022, 1:44 PM
I don't think Fleet has a Git submodule to process remote targets. Kustomzie is treated a second class citizen in Fleet right now. I wanted to do exactly what you are doing several months ago, asked here and came to the same conclusion. You can use kustomize, but it's all got to be in the same git repo. We ended up putting similar projects based on LoB, team, or audit strategy (some are SOC 1 or 2 apps), and then point fleet at that repo, specify the folder for each app.
Your other option is to write helm charts and use Kustomize to patch.
663 Views