Introducing a new way to review your PRs.

Read the announcement

nklmilojevic / sofka

A Kubernetes TUI, reimagined in Rust - built on kube-rs and ratatui, async-first from the ground up.

View on GitHub

19 documents · Updated Nov 4, 2026

docs / fleet-gitops-and-argocd-integration

Fleet, GitOps, and Argo CD integration

This area connects the live state of Kubernetes clusters to the delivery systems that manage it. The fleet view compares selected contexts at a high level. The GitOps and Argo CD views then trace a selected resource to its Flux or Argo CD ownership, source, revision, destination, and current health.

For the wider cluster workflow, see Cluster operations and analysis. For workload-focused inspection and drill-down tools, see Workload operations and analysis tools.

Fleet view

The fleet view is an opt-in dashboard for comparing several kubeconfig contexts without changing context one at a time. It gives each selected cluster an independent summary, so one unavailable cluster does not hide the state of the others.

The dashboard reports:

  • connection state and Kubernetes version
  • ready nodes and unhealthy pods
  • failed Flux resources
  • degraded Argo CD Applications
  • the read-only policy that applies to the context

Flux and Argo CD counts are absent when the related custom resource definitions are not present. This separates “the integration is not installed” from “the integration reports a failure.”

Fleet membership

Fleet membership comes from the configured context list plus saved changes made in the context switcher. The configuration remains the base list. A saved mark can add a context or mask one from that list without rewriting the main configuration.

The dashboard queries only these explicit members. It limits parallel work and gives each context a time limit. A slow, denied, or unreachable context therefore becomes an error row while other rows continue to update.

The selected row is the bridge from comparison to investigation. Enter changes to that context through the normal context-switch path. When Argo CD Applications are degraded, Enter can open the Applications that match the fleet count instead of showing an unrelated default view.

References: src/fleet.rs• L14-111 src/…/fleet.rs• L18-117 src/…/fleet.rs• L119-212

Flux GitOps view

The GitOps view explains how Flux delivers the selected object. It follows the ownership labels on the object to a Kustomization or HelmRelease, then follows that owner to its source and any Kustomizations that must be ready first.

The view presents a delivery chain that answers four questions:

QuestionContext shown
Who manages this object?Flux Kustomization or HelmRelease
Where does the desired state come from?Git, OCI, Helm, or another Flux source
What revision is in use?The source revision and the owner’s applied revision
What blocks delivery?Suspended owners, unavailable sources, failed readiness, or unmet dependencies

The same view can show the owner’s inventory. Inventory entries identify resources that the owner reports as managed and can provide a jump to a resource in the current cluster. The inventory is a delivery record, not a fresh read of every managed object. A remote-cluster configuration can therefore be described without offering a misleading local jump.

The view refreshes the selected object and the chain when it opens or refreshes. Missing objects and read failures remain visible as warnings rather than being treated as the same condition. This distinction helps an engineer tell the difference between a resource that was removed and a resource that could not be read.

References: src/gitops.rs• L1-13 src/gitops.rs• L19-59 src/gitops.rs• L63-135 src/gitops.rs• L138-228 src/gitops.rs• L276-350 src/…/gitops.rs• L10-35 src/…/gitops.rs• L45-161

Argo CD view

The Argo CD view explains an Application’s delivery state and the resources it manages. It reads the Application custom resource and can also start from a managed Kubernetes object by using Argo CD tracking metadata to find its Application.

The view relates these parts of the Application:

  • sync state and health state
  • project, destination, and deployed revision
  • one or more source repositories, paths, charts, or revisions
  • managed resources with their own sync and health state
  • reasons that block sync or explain unhealthy state

An ApplicationSet is treated as a producer of Applications rather than as an Application with its own managed-resource chain. Its view shows its generators and the Applications reported as produced.

References: src/argocd.rs• L1-13 src/argocd.rs• L194-209 src/argocd.rs• L219-333 src/argocd.rs• L335-365 src/argocd.rs• L446-510 src/…/argocd.rs• L18-56 src/…/argocd.rs• L110-188

Argo CD ownership

Argo CD ownership is the reverse path from a live object to the Application that claims it. The exact tracking annotation is preferred. Common instance labels provide a fallback, but a label alone can be shared by other tools and can be truncated.

When the named Application is found, the view shows the relationship and its current delivery state. When the annotation names an Application that is missing, the view reports a dangling reference. When only a label matches and no Application claims the object, the view reports the object as not managed by Argo CD instead of treating the label as proof.

If more than one Argo CD instance uses the same Application name, the Application whose status lists the selected object wins. This keeps ownership tied to the object-to-Application relationship rather than to a name alone.

References: src/argocd.rs• L179-209 src/argocd.rs• L571-606 src/argocd.rs• L690-708 src/argocd.rs• L764-812 src/…/argocd.rs• L132-160 src/…/argocd.rs• L288-380

Argo CD destinations

An Argo CD Application can deploy to the connected cluster or to another cluster. The view resolves the destination against the current server and kubeconfig context names, then keeps the destination visible when it cannot resolve it.

This destination context controls navigation. Resources in the connected cluster can be opened and inspected. Resources in another resolved cluster are named with that context so the engineer can switch to it. An unresolved destination does not create a jump that might open a same-named object in the wrong cluster.

The view can expand a current-cluster managed resource into its owned workload chain. This gives the Application-level state a path to the live descendants that may explain a failed health check. It does not search a remote destination from the current connection.

References: src/argocd.rs• L95-119 src/argocd.rs• L513-564 src/…/argocd.rs• L383-443 src/…/argocd.rs• L505-529 src/…/argocd.rs• L657-710

Argo CD blocking state

The blocking summary separates drift from failure. Out-of-sync resources show that live state differs from the desired source. Degraded or missing resources, failed operations, invalid specifications, and unhealthy descendants explain why the Application is not healthy or cannot progress.

When the Application says it is unhealthy but does not identify a resource-level cause, the view can inspect current-cluster workload descendants and add a small set of concrete causes. A progressing rollout is not treated as a failure. A suspended automatic sync policy is shown as a delivery block because the Application will not repair itself until the policy resumes.

References: src/argocd.rs• L991-1057 src/argocd.rs• L1059-1130 src/…/argocd.rs• L839-905 src/…/argocd.rs• L939-996

Delivery and ownership flow

The following flow shows how a fleet signal leads to a delivery explanation and then to a live resource.

flowchart TD
    A[Selected fleet contexts] --> B[Cluster health summaries]
    B --> C{Problem signal}
    C -->|Flux-managed resource| D[Flux owner and reconciliation chain]
    D --> E[Source revision and dependencies]
    C -->|Argo CD Application| F[Application sync and health]
    C -->|Argo-managed resource| G[Tracking metadata]
    G --> F
    F --> H[Destination and managed resources]
    H --> I[Current-cluster resource or owned workload]

The views complement each other without claiming that every object belongs to a delivery system. An object with no Flux labels or Argo CD tracking is still a valid live object; the integration view reports that no matching owner was found.

References: src/fleet.rs• L64-111 src/gitops.rs• L63-110 src/argocd.rs• L571-606 src/argocd.rs• L764-923

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep fleet health counts and their drill-in filters aligned. A changed definition of degraded Applications must update both the row count and the Applications view opened from that row.
  • Keep Flux owner labels, source references, and dependency references aligned with the resource kinds resolved by the application layer. A new reference kind can otherwise appear in the chain without a usable target.
  • Keep Argo CD destination resolution tied to navigation behavior. A change that broadens destination matching must not allow a remote object to be opened against the current cluster.
  • Keep Argo CD tracking lookup rules aligned with the “unmanaged” and “dangling reference” messages. Annotation and label evidence have different trust levels.
  • Keep managed-resource group identity with each Argo CD row. Kind and name alone can point to the wrong API group.

Important failure modes

TriggerConsequenceGuard
A fleet context cannot connect or finish in timeThat context reports an error while other contexts remain usableIndependent gather tasks with a per-context timeout
Flux or Argo CD custom resource definitions are absentThe related fleet metric is unavailable, not falsely reported as zeroOptional counts use an absent state
A Flux source or dependency is missing or not readyReconciliation is shown as blocked instead of healthyThe chain reports missing objects and readiness state
An Argo CD Application points to another or unknown destinationA jump could inspect the wrong cluster or fail without contextDestination resolution gates jump targets
An Argo tracking annotation names a missing ApplicationThe object appears to have a broken ownership linkExact tracking metadata is reported as a dangling reference
An Argo CD health failure has no resource-level causeThe Application state has no useful explanationCurrent-cluster owned workloads are checked when the destination and resource shape allow it

Key files

FileWhy to read it
src/fleet.rsDefines fleet membership state, row data, and the meaning of a healthy context.
src/…/fleet.rsShows how fleet members are gathered, summarized, refreshed, and opened for drill-in.
src/gitops.rsDefines the Flux ownership chain from managed object to owner, source, and dependencies.
src/…/gitops.rsShows how the selected object is refreshed and how the Flux chain becomes navigable findings.
src/argocd.rsDefines Argo CD status, ownership, sources, destinations, managed resources, and blocking explanations.
src/…/argocd.rsShows how Argo CD Applications and managed objects are resolved and how live descendants are inspected.
docs/providers.mdDescribes fleet membership and the user-facing fleet summary.
docs/features.mdGives the user-facing scope of the GitOps and Argo CD views.