sync path configuration would overwrite path of existing Kustomization #1517
Replies: 4 comments 6 replies
-
You can't change the path of a bootstrapped cluster, run |
Beta Was this translation helpful? Give feedback.
-
Hi @stefanprodan , I am facing similar issue and trying to figure out what is the right way to do it.
Why this is happening? In this case there is no conflicts between linux directory path and the git repo. How flux is referring my existing cluster path? Of course, the common components are in my kind k8s cluster where the previous bootstrap command installed the flux components. I read the documentation but not getting an idea, how to manage multiple repos after only one bootstrap on same k8s cluster. |
Beta Was this translation helpful? Give feedback.
-
I just encountered this problem and I believe @stefanprodan is correct. The problem for me was that I was trying to move repos on what is managing the cluster's flux deployment. If you already have a repo that is managing the flux-system for a cluster, it won't allow you to bootstrap it again on the system level. So for context, I had my local minikube cluster setup and it was using github as the source of truth for the flux-system
This installs all the components onto whatever is my current context was, which was a minikube cluster locally. I wanted to move this over to my internal gitlab server (I was starting with the tutorials and following the guides to get myself familiar with what it was doing behind the scenes for the tokens and what needs to be passed & set) so I wanted to bootstrap it again:
But received the same error message:
It's because my minikube local still had the flux system from the previous bootstrap, you need to delete & |
Beta Was this translation helpful? Give feedback.
-
Sorry for necroing this thread, but I'm trying to reorganize my k8s cluster and wanted to give it a proper name. I tried running |
Beta Was this translation helpful? Give feedback.
-
Hi - I am trying to setup flux so that the flux GitRepositoryObjects and Kustomization objects in the flux-system folder point to a second repo where I define my environments. The app being deployed in the environments is just @stefanprodan's podinfo app.
flux bootstrap github --owner=geoffhendrey --repository=flux-system --private=false --personal=true --path=flux-system-overlays/env1 --branch=master --verbose
When I try to do this, I get:
✗ sync path configuration ("./flux-system-overlays/env1") would overwrite path ("./environment-overlays/env1") of existing Kustomization
yet it seems as though podinfo is properly deployed: `Every 2.0s: flux get kustomizations GHENDREY-M-G6C7: Sun Jun 13 22:57:57 2021
NAME READY MESSAGE REVISION SUSPENDED
flux-system True Applied revision: master/d75f0a9ef55af3eb000a108c426b552c69e86724 master/d75f0a9ef55af3eb000a108c426b552c69e86724 False
podinfo True Applied revision: master/685371108de7b5772c8500293ebe62f258bbc783 master/685371108de7b5772c8500293ebe62f258bbc783 False`
in the logs I see
2021-06-14T05:59:24.160Z info GitRepository/podinfo.flux-system - Reconciliation finished in 361.1029ms, next run in 30s
so I believe reconciliation is fine.I need help understanding why this error (mentioned earlier in the posd) is shown in the bootstrap output:
✗ sync path configuration ("./flux-system-overlays/env1") would overwrite path ("./environment-overlays/env1") of existing Kustomization
The repository I am using for flux-system is here: https://github.com/geoffhendrey/flux-system
The repo that is pointed to by the Kustomization controller in said flux-system repo, is here: https://github.com/geoffhendrey/flux-environments
Beta Was this translation helpful? Give feedback.
All reactions