Replies: 2 comments 9 replies
-
This is the workflow I was hoping / imagining existed:
So basically, I was expecting to be able to do the source controller's job for it, at least at the very beginning. This would allow for someone who is developing their flux configuration on their laptop first before even deploying, or doing an offline restore. This raises a couple of questions, which I think have known answers:
|
Beta Was this translation helpful? Give feedback.
-
I'm glad I'm not the only person who wants to keep things self-hosted and limit the number and importance of external services. I would imagine that it should be possible to edit/update the running Flux config resource(s) to point to a different git repository, assuming the content is the same. My current plan to try is having an instance of Gitea running in Docker on my laptop to point Flux to initially, mirror/migrate the repo to the "prod" Gitea in the cluster once it's stood up by Flux, then update the Flux sync resource to point to the in-cluster instance. This is based on my poking around the helm charts and reading things like fluxcd-community/helm-charts#88 which seem to indicate that the I could be wrong about all of that, will report back whether it worked. |
Beta Was this translation helpful? Give feedback.
-
A discussion similar to the question:
fluxcd/source-controller#1504 @nogweii - you may be interested in this thread.
We are talking about a GitLab instance that runs on a Kubernetes cluster, and the source of truth for the cluster is in there, as a Git repository. This sounds backwards, but it is probably not that uncommon of a configuration, and we certainly have users trying this now. Why would you host the source of truth inside the cluster? It avoids an external dependency at runtime, I could imagine this scenario on for example a submarine where there are coders who need to work in the airgap, it's not such a strange use case.
It's just not so easy to support, since there is a chicken-and-egg problem. How do you capture enough state from the deployment so that you can re-bootstrap the cluster, restore the source of truth from the external backup, and then pivot to the cluster's internal source of truth? You need some continuous backup process, to be sure that you're not memory-holing changes when the cluster goes down and needs to be restored, but those technologies aren't so exotic, we shouldn't be surprised if users say they do that. We should have some kind of answer for this question.
(So I'm thinking of building a workflow for capturing in-cluster Flux state and echoing it out to OCI, as a backup... but first I want to poll the community and ask how we're solving this problem, if there are already good processes nailed down that target this idea?)
I have a different parallel structure (ClickOps dashboard workflow) and I'd like to GitOps-ify it. Using Cozystack, there is a dashboard where admins can click on options in a catalog, paste in Helm values, run upgrades, and it's all managed using Flux HelmReleases on the cluster, inside of various tenants. This would not be so bad if there was a way to capture all that state, and echo it back out to a versioned store.
For a variety of reasons, I do not want to use Git. I intend to use OCIRepository, you can use OCI or Git, but regardless of how the current desired state is stored and versioned, I hope you can see this is the same problem!
Even if it's a different facet of the general problem: how can we keep the desired state's source of truth in the cluster without compromising on the repeatability and recoverability of that state after a total cluster loss? Can we get some feedback from the community about how this is handled in your orgs. Are there any other obvious use cases for this - the one that comes to mind is a mobile store-front that continues to operate and can receive an update, delivered via sneakernet, even when it is in disconnected mode.
Is this a problem that other people are grappling with? What are the obvious solutions we have overlooked, if there are any?
Beta Was this translation helpful? Give feedback.
All reactions