Get Started with Flamingo: A Flux CD Subsystem for Argo CD

By Chanwit Kaewkasi
September 12, 2023

Flux CD and Argo CD are key players in the Kubernetes GitOps landscape. Flamingo helps you make the best of both tools. Learn more about it and how to get started here.

Related posts

Weave GitOps & Flux CD August Updates

Flux CD: The Go-To GitOps Tool for Enterprises - Here's Why

Flamingo: Expand Argo CD with Flux

Flamingo, known as the Flux Subsystem for Argo (FSA), integrates Flux CD and Argo CD, two leading tools in the GitOps landscape. By introducing Flamingo, DevOps teams can harness both tools without compromising the strengths of either.

The Flamingo container image is designed to extend the equivalent Argo CD version, enabling users to visualize and manage Flux CD workloads within Argo CD. Moreover, it ensures that any upstream CVEs in Argo CD are quickly addressed in Flamingo, providing a secure and stable environment.

The rationale behind Flamingo's development is clear: both Flux CD and Argo CD offer valuable capabilities in the GitOps space, but each has its limitations. Flamingo bridges these tools, allowing teams to access Flux CD features directly via the Argo CD interface.

Why Use Flamingo?

Flux CD and Argo CD, CNCF open-source projects, are prominent continuous delivery tools, each boasting distinct capabilities. Flamingo was designed to extract the best from both.

With Flamingo, you can:

  • Leverage Flux CD's capabilities directly within the Argo CD interface
  • Streamline Operations: Flamingo CLI simplifies the installation and management of the Flamingo server component, removing the manual intricacies.
  • Enhanced Visibility: With the ability to view Flux CD objects directly in the Argo CD UI, DevOps and platform teams can have a more consolidated view of their GitOps setups.

While Argo CD has advantages, Flux CD has carved out its unique set of features that make it a compelling choice for many DevOps teams. Here are a few reasons why many DevOps teams are drawn to Flux CD.

  • OCI Artifact Support: Flux CD seamlessly supports Open Container Initiative (OCI) artifacts for Kustomizations and Helm, ensuring consistent deployments whether you're using Kubernetes manifests, Kustomizations, or Helm charts.
  • Modularity: Thanks to its architecture of specialized controllers, Flux CD stands out in extensibility. Case in point: the TF-Controller extension broadens Flux CD's reach to reconcile resources beyond Kubernetes.
  • In-depth Helm Integration: With its native Helm SDK-based controller, Flux CD offers a richer Helm experience. This allows for advanced Helm features, such as automated Helm Release rollbacks in case of deployment failures, giving teams more confidence in their release processes.

How does Flamingo work?

Flamingo uses Loopback Reconciliation, a feature used to synchronize GitOps-deployed applications between Flux CD and Argo CD. This feature can be enabled by selecting the "FluxSubsystem" within the Argo CD UI.


Here’s a breakdown of how Loopback Reconciliation works:

  • An Argo CD application manifest is deployed to a cluster using Kustomization or Helm.
  • Flamingo translates this manifest into its Flux CD equivalent – a Kustomization object or a HelmRelease object with a Source, based on the Argo CD manifest's mode. If matching Flux CD objects already exist, Flamingo references these instead of creating duplicates.
  • Instead of relying on Argo CD's native reconciliation, Flamingo checks the state of the Flux CD objects and uses them as the desired state. It then syncs the Argo CD application using the data from the Flux CD objects to feedback to Argo CD.
  • Loopback Reconciliation circles back to the desired state of the Flux CD objects, ensuring applications consistently match their desired deployments.


How to use Flamingo CLI

Flamingo CLI is the command line interface component of Flamingo, the Flux CD Subsystem for Argo. This CLI is specifically designed to make the user experience seamless when it comes to the installation, management, and operation of the Flamingo server component.

This aspect ensures that users can efficiently carry out tasks without diving deep into intricate configurations or understanding complex Kubernetes-related processes.

The server component, which the CLI manages, is not a vanilla Argo CD server. It is an enhanced version of Argo CD with the Flux CD sub-system built-in, tailored with new features for Flamingo's specific use case.

This enhancement makes it unique in the ecosystem, acting as an integral bridge connecting Flux CD's GitOps Toolkit with the Argo CD UI. By ensuring this integration, it empowers users to leverage the strengths of both Flux CD and Argo CD, optimizing workflows and enhancing overall efficiency.

Flamingo CLI Features and Commands

The Flamingo CLI is designed with simplicity and efficiency in mind. Here are some of the operations it supports:

  • Listing Flamingo installation candidates.
  • Installing the Flamingo server in a specific namespace.
  • Displaying the initial password for the admin user.
  • Generating Flamingo applications from Flux CD objects such as Kustomizations and HelmReleases.
  • Listing all Flamingo applications in a specific namespace or across all namespaces.

All these operations are executed with easy-to-understand command line commands, with optional flags for extended functionalities.

Flamingo CLI Commands

List Flamingo Candidates: View all available Flamingo versions with an optional flag to include development versions.

flamingo list-candidates [--dev]

Install Flamingo: Easily set up Flamingo in your desired namespace.

flamingo install [--read-only-mode] [--dev --version=v2.8.3-dev]

Password Management: Retrieve the initial password for the admin user quickly.

flamingo show-init-password

Application Generation: Convert Flux Flux CD objects into Flamingo applications with just a command. Support both Kustomizations (ks) and HemReleases (hr)

flamingo generate-app <type>/<name>

View Flamingo Applications: View all your Flamingo applications in a specific namespace or all namespaces.

flamingo get [--namespace=<namespace_name>] [--all-namespaces]

How to Install Flamingo

Homebrew

Install Flamingo CLI using Homebrew:

brew install flux-subsystem-argo/tap/flamingo

With Curl

You can also install Flamingo CLI using curl:

curl -sL https://bit.ly/flamingo-cli | sudo bash

Quick Tutorial - Visualizing Flux CD OCI in Argo CD UI

1. Create a Kind cluster. We use Kubernetes v1.27 image of KIND in this tutorial.

kind create cluster

2. Install Flux. We use Flux CD v2.1.0 here.

flux install

3. Run Flamingo install. Please make sure that you use Flamingo CLI v0.3.0.

flamingo install --version=v2.8.3

4. Create the following Flux objects.

cat << EOF | kubectl apply -f -

---
apiVersion: v1
kind: Namespace
metadata:
name: podinfo-kustomize
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: OCIRepository
metadata:
name: podinfo
namespace: podinfo-kustomize
spec:
interval: 10m
url: oci://ghcr.io/stefanprodan/manifests/podinfo
ref:
tag: latest
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: podinfo
namespace: podinfo-kustomize
spec:
interval: 10m
targetNamespace: podinfo-kustomize
prune: true
sourceRef:
kind: OCIRepository
name: podinfo
path: ./
EOF

5. Generate a new Flamingo app from the podinfo Kustomization object.

flamingo generate-app \
--app-name=podinfo-ks \
-n podinfo-kustomize ks/podinfo

6. Verify that the generated application is live and connects to the Flux CD objects.

flamingo get -n podinfo-kustomize

7. Now you can open Flamingo UI and see the object displayed there.

flamingo show-init-password
kubectl -n argocd port-forward svc/argocd-server 8080:443

Here’s a video tutorial

Make the best of Argo CD and Flux CD with Weave GitOps Assured

Flamingo bridges Flux CD and Argo CD, seamlessly integrating Flux's capabilities within Argo CD environments. It not only combines the strengths of both tools but also opens doors to broader GitOps tool integrations, ensuring efficient management of complex settings.

Explore Flamingo to elevate your GitOps processes. If you’re currently an Argo CD user, consider downloading Flamingo. Also, explore the Weave GitOps open source to further extend your GitOps workflows, especially for IaC management.

For a broader solution, check out Weave GitOps Assured by Weaveworks, the creators of GitOps and FluxCD. This solution combines open-source tools with enterprise support to enhance Continuous Delivery and Kubernetes management. It includes components such as Flux CD, Flagger, Observability UI, Infrastructure TF Controller, Flamingo Flux Subsystem for Argo, Weave Policy Agent, and a VSCode Plugin. Enterprise teams needing advanced features can contact us for a detailed demo.


Related posts

Weave GitOps & Flux CD August Updates

Flux CD: The Go-To GitOps Tool for Enterprises - Here's Why

Flamingo: Expand Argo CD with Flux

Whitepaper: Enabling a Self-Service Developer Experience with GitOps

Download this whitepaper to learn how you can enable self-service developer experience with GitOps.

DOWNLOAD NOW