It’s a relief ! I am not the only one confused !
I also find this turn very ambiguous actually.
Apparently, @vnagy works a lot on GitOps with Gitlab. Maybe he can help !
Following is my understanding of the vision. Please somebody correct me if I am wrong :
- Era of Agentk / Gitlab 13.4 - 13.10 (Using GitOps with the agent for Kubernetes (deprecated) | GitLab)
Enables connection between Gitlab and Kubernetes.
GitOps in a “push” method : Gitlab (formerly agentk) watchs Git repositories and ask for changes in Kubernetes. Like in this diagram : Using GitOps with the agent for Kubernetes (deprecated) | GitLab
- Use Agentk in pipelines / Gitlab 14.1 - 14.2 (Using GitLab CI/CD with a Kubernetes cluster | GitLab)
Facilitates connections to Kubernetes cluster from pipelines (run kubectl commands through the agent without managing authentication).
Enables to push manifests via CI/CD
- Arrival of Flux / Gitlab 16.1 (Using GitOps with a Kubernetes cluster | GitLab)
GitOps in a “pull” method : Flux watchs Git repositories and apply manifests.
This implies that communication is reversed : Kubernetes (formerly Flux) connects to Gitlab to get source code. No more need for Gitlab to connect to Kubernetes
Now, new problem : Switching to asynchronous deployment : the problem with this approach is that it breaks synchronicity in pipelines : you declare changes in manifests, then you have to wait for Flux to apply, and you cannot procede following tasks (like acceptance tests for example). There is an issue for that : CI support for triggering a Flux sync (#405007) · Issues · GitLab.org / GitLab · GitLab
Gitlab seems to recommend using Flux and agentk together in this diagram Using GitOps with a Kubernetes cluster | GitLab, which likely seems to resolve this synchronicity problem with notifications. Is it really the intention ?
Gitlab also claims in this same page :
You should use both Flux and agentk for GitOps deployments. Flux keeps the cluster state synchronized with the source, while agentk simplifies the Flux setup, provides cluster-to-GitLab access management, and visualizes the cluster state in the GitLab UI.
And now we arrive to a new feature provided by agentk :
- Dashboard for Kubernetes / Gitlab 16.1 (Dashboard for Kubernetes | GitLab)
This aims to give a UI to observe reconcilation states of Flux resources.
It uses agentk to ask the cluster about the resources.
So agentk seems to have changed from a GitOps controller to a “connection agent” providing observability on Kubernetes.
While it is not mandatory to keep agentk once Flux is used, it may allow new services (synchronicity ?, observability).
But I would really appreciate Gitlab staff point of view on this also !