argocd

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Labels
	LabelArgoCDInstance  = "app.kubernetes.io/instance"
	LabelArgoCDName      = "app.kubernetes.io/name"
	LabelArgoCDPartOf    = "app.kubernetes.io/part-of"
	LabelArgoCDManagedBy = "app.kubernetes.io/managed-by"

	// Annotations
	AnnotationArgoCDInstance = "argocd.argoproj.io/instance"

	// ArgoCD application CRD
	ArgoCDGroup    = "argoproj.io"
	ArgoCDVersion  = "v1alpha1"
	ArgoCDResource = "applications"
	ArgoCDKind     = "Application"

	// Timeout for ArgoCD operations
	ArgoCDTimeout = 60 * time.Second
)

Common ArgoCD labels and annotations

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

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

Detector handles detection and management of ArgoCD resources

func NewDetector

func NewDetector(kubeClient kubernetes.Interface, dynamicClient dynamic.Interface) *Detector

NewDetector creates a new ArgoCD detector

func (*Detector) DetectArgoCDAppsForNamespace

func (d *Detector) DetectArgoCDAppsForNamespace(ctx context.Context, namespace string) ([]unstructured.Unstructured, error)

DetectArgoCDAppsForNamespace finds all ArgoCD Applications that manage resources in the given namespace

func (*Detector) IsArgoCDManagedResource

func (d *Detector) IsArgoCDManagedResource(resource *unstructured.Unstructured) bool

IsArgoCDManagedResource checks if a resource is managed by ArgoCD

type Handler

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

Handler handles ArgoCD application deletion and cleanup

func NewHandler

func NewHandler(dynamicClient dynamic.Interface) *Handler

NewHandler creates a new ArgoCD handler

func (*Handler) DeleteApplication

func (h *Handler) DeleteApplication(ctx context.Context, app unstructured.Unstructured) error

DeleteApplication deletes an ArgoCD application and waits for it to be deleted

func (*Handler) DeleteApplications

func (h *Handler) DeleteApplications(ctx context.Context, apps []unstructured.Unstructured) error

DeleteApplications deletes multiple ArgoCD applications

func (*Handler) RemoveApplicationFinalizers

func (h *Handler) RemoveApplicationFinalizers(ctx context.Context, app unstructured.Unstructured) error

RemoveApplicationFinalizers removes finalizers from an ArgoCD application

Jump to

Keyboard shortcuts

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