argocd

package
v5.36.4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package argocd provides generators for ArgoCD GitOps resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	APIVersion string              `json:"apiVersion" yaml:"apiVersion"`
	Kind       string              `json:"kind"       yaml:"kind"`
	Metadata   ApplicationMetadata `json:"metadata"   yaml:"metadata"`
	Spec       ApplicationSpec     `json:"spec"       yaml:"spec"`
}

Application represents an ArgoCD Application CR for scaffolding.

type ApplicationDestination

type ApplicationDestination struct {
	Server    string `json:"server"    yaml:"server"`
	Namespace string `json:"namespace" yaml:"namespace"`
}

ApplicationDestination defines where ArgoCD should deploy resources.

type ApplicationGenerator

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

ApplicationGenerator generates ArgoCD Application CR manifests.

func NewApplicationGenerator

func NewApplicationGenerator() *ApplicationGenerator

NewApplicationGenerator creates a new ApplicationGenerator.

func (*ApplicationGenerator) Generate

Generate creates an ArgoCD Application CR manifest.

type ApplicationGeneratorOptions

type ApplicationGeneratorOptions struct {
	yamlgenerator.Options

	// ProjectName is used to construct the OCI registry URL.
	ProjectName string
	// RegistryHost is the host of the local OCI registry.
	RegistryHost string
	// RegistryPort is the port of the local OCI registry.
	RegistryPort int32
}

ApplicationGeneratorOptions contains options for generating ArgoCD Application.

type ApplicationMetadata

type ApplicationMetadata struct {
	Name      string            `json:"name"             yaml:"name"`
	Namespace string            `json:"namespace"        yaml:"namespace"`
	Labels    map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
}

ApplicationMetadata contains the metadata for an ArgoCD Application.

type ApplicationSource

type ApplicationSource struct {
	//nolint:tagliatelle // ArgoCD requires this exact casing
	RepoURL        string         `json:"repoURL"             yaml:"repoURL"`
	TargetRevision string         `json:"targetRevision"      yaml:"targetRevision"`
	Path           string         `json:"path,omitempty"      yaml:"path,omitempty"`
	Directory      *DirectorySpec `json:"directory,omitempty" yaml:"directory,omitempty"`
}

ApplicationSource defines where ArgoCD should fetch manifests from.

type ApplicationSpec

type ApplicationSpec struct {
	Project     string                 `json:"project"              yaml:"project"`
	Source      ApplicationSource      `json:"source"               yaml:"source"`
	Destination ApplicationDestination `json:"destination"          yaml:"destination"`
	SyncPolicy  *SyncPolicy            `json:"syncPolicy,omitempty" yaml:"syncPolicy,omitempty"`
}

ApplicationSpec contains the source and destination configuration.

type AutomatedSync

type AutomatedSync struct {
	Prune    bool `json:"prune"    yaml:"prune"`
	SelfHeal bool `json:"selfHeal" yaml:"selfHeal"`
}

AutomatedSync enables automatic syncing.

type DirectorySpec

type DirectorySpec struct {
	Recurse bool `json:"recurse" yaml:"recurse"`
}

DirectorySpec configures directory-based source options.

type SyncPolicy

type SyncPolicy struct {
	Automated *AutomatedSync `json:"automated,omitempty" yaml:"automated,omitempty"`
}

SyncPolicy defines automated sync behavior.

Jump to

Keyboard shortcuts

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