gitops

package
v5.99.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gitops 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 CRDetector

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

CRDetector detects existing GitOps Custom Resources in a source directory.

func NewCRDetector

func NewCRDetector(sourceDir string) *CRDetector

NewCRDetector creates a new detector for the given source directory.

func (*CRDetector) FindArgoCDApplication

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

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

func (*CRDetector) FindFluxInstance

func (d *CRDetector) 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