argocd

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package argocd executes safe, reversible Argo CD operations on Application CRs — the Argo half of the autonomy ladder's executable rungs, mirroring internal/executor/flux. Ops map as: suspend = pause auto-sync (remove spec.syncPolicy.automated, preserving the prior value in an annotation so resume can restore it losslessly), resume = restore it, reconcile = the self-cleaning argocd.argoproj.io/refresh annotation (the analogue of Flux's requestedAt). It patches the Application custom resource directly via the dynamic client — the same access path the argocd GitOps provider reads through (internal/providers/gitops/argocd) — never the Argo API server.

suspend/resume are GET-then-PATCH and deliberately not transactional: a concurrent syncPolicy edit in the window can be overwritten. Accepted — the approve rung is human-clicked and the Flux executor's blind patch carries the same exposure.

Index

Constants

View Source
const PausedPolicyAnnotation = "runlore.io/paused-sync-automated"

PausedPolicyAnnotation stores the JSON of spec.syncPolicy.automated at pause time so resume restores the EXACT prior policy (prune/selfHeal/allowEmpty). Removing automated without saving it would make the op registry's Reversible=true derivation a lie.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

Executor runs reversible Argo CD operations via the dynamic client.

func New

func New(client dynamic.Interface) *Executor

New builds an Executor backed by a dynamic client.

func (*Executor) Execute

func (e *Executor) Execute(ctx context.Context, a providers.Action) error

Execute applies the action's reversible Argo CD operation to its target.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL