detector

package
v5.20.3 Latest Latest
Warning

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

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

Documentation

Overview

Package detector provides utilities for detecting existing Kubernetes resources in the source directory, such as GitOps Custom Resources managed by KSail.

Index

Constants

View Source
const (
	// ManagedByLabel is the label key used to identify KSail-managed resources.
	ManagedByLabel = "app.kubernetes.io/managed-by"
	// ManagedByValue is the label value for KSail-managed resources.
	ManagedByValue = "ksail"

	// FluxInstanceAPIVersion is the API version for FluxInstance CRs.
	FluxInstanceAPIVersion = "fluxcd.controlplane.io/v1"
	// FluxInstanceKind is the kind for FluxInstance CRs.
	FluxInstanceKind = "FluxInstance"
	// FluxInstanceDefaultName is the default name for KSail-managed FluxInstance.
	FluxInstanceDefaultName = "flux"
	// FluxInstanceNamespace is the namespace for FluxInstance CRs.
	FluxInstanceNamespace = "flux-system"

	// ArgoCDApplicationAPIVersion is the API version for ArgoCD Application CRs.
	ArgoCDApplicationAPIVersion = "argoproj.io/v1alpha1"
	// ArgoCDApplicationKind is the kind for ArgoCD Application CRs.
	ArgoCDApplicationKind = "Application"
	// ArgoCDApplicationDefaultName is the default name for KSail-managed ArgoCD Application.
	ArgoCDApplicationDefaultName = "ksail"
	// ArgoCDNamespace is the namespace for ArgoCD resources.
	ArgoCDNamespace = "argocd"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GitOpsCRDetector

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

GitOpsCRDetector detects existing GitOps Custom Resources in a source directory.

func NewGitOpsCRDetector

func NewGitOpsCRDetector(sourceDir string) *GitOpsCRDetector

NewGitOpsCRDetector creates a new detector for the given source directory.

func (*GitOpsCRDetector) FindArgoCDApplication

func (d *GitOpsCRDetector) FindArgoCDApplication() (string, error)

FindArgoCDApplication searches for an existing KSail-managed ArgoCD Application CR. Returns the file path if found, empty string otherwise.

func (*GitOpsCRDetector) FindFluxInstance

func (d *GitOpsCRDetector) FindFluxInstance() (string, error)

FindFluxInstance searches for an existing KSail-managed FluxInstance CR. Returns the file path if found, empty string otherwise.

Jump to

Keyboard shortcuts

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