sveltos icon indicating copy to clipboard operation
sveltos copied to clipboard

Support for ArgoCD and native Kustomize GitOps deployments

Open irizzant opened this issue 5 months ago • 7 comments

Currently, only Flux Kustomization objects are supported according to the documentation.

I would like to request support for ArgoCD and native Kustomize integration in Sveltos, to enable users to reuse their existing ArgoCD installations for deploying Kustomize resources while adhering to the GitOps approach.

This feature would allow users to leverage ArgoCD as a deployment engine for Kustomize manifests, enhancing flexibility for GitOps workflows and reducing the need to maintain multiple deployment tools.

irizzant avatar Jul 22 '25 14:07 irizzant

Thanks @irizzant

Sveltos natively supports Kustomize APIs for processing Kustomize files. As Sveltos doesn't include its own Git solution (recognizing the strength of FluxCD and ArgoCD), integration with FluxCD is used to provide these files.

  1. FluxCD retrieves files from a Git repository using a Flux source (e.g., a GitRepository instance).
  2. Sveltos then consumes those files from the Flux source, processes them with Kustomize apis and deploys it to the managed clusters.

As far as I know, ArgoCD does not provide a capability similar to what FluxCD Sources provide. But if that is there, happy to extend Sveltos. Please let me know. Thank you!

gianlucam76 avatar Jul 22 '25 18:07 gianlucam76

@gianlucam76 Thank you for the clarification. If I understand correctly, Sveltos leverages Flux Source to fetch Kubernetes resources to deploy. However, for Helm, Sveltos is already capable of deploying charts without relying on FluxCD, presumably by using a Go library to interface directly with Helm.

Would it be feasible to adopt a similar approach for Kustomize? Since Kustomize supports remote Git repositories, Sveltos could potentially interface with Kustomize directly (using a suitable Go library), fetch the manifests from remote sources, and deploy them, without the need for FluxCD as an intermediary. This could streamline the workflow and reduce dependencies.

Let me know if this makes sense or if there are any technical limitations I might be missing.

irizzant avatar Jul 23 '25 09:07 irizzant

Thank you @irizzant

That is already available. You need to use this image though https://hub.docker.com/repository/docker/projectsveltos/addon-controller-git/general

"This is needed to support kustomization that points to a oci/git repo that utilizes remote kustomization references."

Essentially at every release we build two images for addon controller. This second one contains git which is needed for the use case you described.

We added it with @MagnusRef (it was a use case he had)

I never documented it (my bad). But if you can confirm that works, I will gladly update documentation

gianlucam76 avatar Jul 23 '25 09:07 gianlucam76

Hi @gianlucam76,

thanks for your explanation!

Just to clarify, with this additional controller, will the syntax allow me to directly reference a Git repository that contains a Kustomize layout, without the need for a Flux GitRepository resource?
For example, will I be able to use a ClusterProfile that points straight to a remote Git repo structured for Kustomize and have the controller fetch and apply those manifests?

Thanks again for your support!

irizzant avatar Jul 23 '25 16:07 irizzant

Hi it is not an additional controller.

It is the regular addon-controller. But you will need to use the image projectsveltos/addon-controller-git:v0.57.2 for instance instead of projectsveltos/addon-controller:v0.57.2

And yes, you should be able to create a ClusterProfile, under the KustomizationRef section, that points to a remote Git repo structured for Kustomize and all should be deployed.

I am not a Kustomize expert so @MagnusRef tried it out at the time. I am not sure if anybody else has used it lately. Thats why I am saying it "should" work

When/if you get a chance please give it a try and let me know. Thank you

gianlucam76 avatar Jul 23 '25 17:07 gianlucam76

Hi @gianlucam76 I tried to open the link you provided (https://hub.docker.com/repository/docker/projectsveltos/addon-controller-git/general) but this is what I get

Image

irizzant avatar Aug 08 '25 08:08 irizzant

Sorry @irizzant my bad.

This is the image you need to use for addon-controller

projectsveltos/addon-controller-git:tagname

where tag name is v0.57.2 or v1.0.0 (or the release you are using)

gianlucam76 avatar Aug 08 '25 09:08 gianlucam76