extract

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHelpMessage added in v0.1.22

func GetHelpMessage(err error) string

GetHelpMessage returns a helpful message for a given error if one exists

func HelmHookFilter added in v0.1.22

func HelmHookFilter(obj unstructured.Unstructured) bool

returns true if the object is NOT a Helm hook

func RenderApplicationsFromBothBranches added in v0.1.22

func RenderApplicationsFromBothBranches(
	argocd *argocdPkg.ArgoCDInstallation,
	timeout uint64,
	baseApps []argoapplication.ArgoResource,
	targetApps []argoapplication.ArgoResource,
	prefix string,
	deleteAfterProcessing bool,
) ([]ExtractedApp, []ExtractedApp, time.Duration, error)

RenderApplicationsFromBothBranches extracts resources from both base and target branches by applying their manifests to the cluster and capturing the resulting resources

Types

type ErrorKind added in v0.1.22

type ErrorKind string

ErrorKind represents different types of errors we look for

const (
	ErrorNoClusterWithName    ErrorKind = "there are no clusters with this name"
	ErrorHelmTemplate         ErrorKind = "helm template ."
	ErrorAuthRequired         ErrorKind = "authentication required"
	ErrorAuthFailed           ErrorKind = "authentication failed"
	ErrorOCIRegistry          ErrorKind = "error logging into OCI registry"
	ErrorPathNotExist         ErrorKind = "path does not exist"
	ErrorYAMLToJSON           ErrorKind = "error converting YAML to JSON"
	ErrorHelmTemplateDesc     ErrorKind = "Unknown desc = `helm template ."
	ErrorKustomizeBuild       ErrorKind = "Unknown desc = `kustomize build"
	ErrorUnableToResolve      ErrorKind = "Unknown desc = Unable to resolve"
	ErrorInvalidChartRepo     ErrorKind = "is not a valid chart repository or cannot be reached"
	ErrorRepoNotFound         ErrorKind = "Unknown desc = repository not found"
	ErrorCommitSHA            ErrorKind = "to a commit SHA"
	ErrorFetchChart           ErrorKind = "error fetching chart: failed to fetch chart: failed to get command args to log"
	ErrorClusterVersionFailed ErrorKind = "ComparisonError: Failed to load target state: failed to get cluster version for cluster"
)

for errors from Argo CD

type ExtractedApp added in v0.1.4

type ExtractedApp struct {
	Id         string
	Name       string
	SourcePath string
	Manifests  []unstructured.Unstructured
	Branch     git.BranchType
}

contains a app name, source path, and extracted manifest

func CreateExtractedApp added in v0.1.11

func CreateExtractedApp(id string, name string, sourcePath string, manifest []unstructured.Unstructured, branch git.BranchType) ExtractedApp

CreateExtractedApp creates an ExtractedApp from an ArgoResource

func (*ExtractedApp) FlattenToString added in v0.1.21

func (e *ExtractedApp) FlattenToString(ignoreResourceRules []resource_filter.IgnoreResourceRule) (string, error)

Jump to

Keyboard shortcuts

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