flux

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultInterval = 5 * time.Minute
	DefaultTimeout  = 5 * time.Minute // TODO: make this configurable via annotations on plugin / environment variable (Test scenarios)
	DefaultRetry    = 3               // TODO: make this also configurable via annotations on plugin
)
View Source
const (
	HelmRepositoryDefaultNamespace = "greenhouse" // TODO: make this configurable via args or env var
)

Variables

This section is empty.

Functions

func BuildJSONPatchReplace added in v0.9.0

func BuildJSONPatchReplace(opt greenhousev1alpha1.PluginOption, index int, group, name string) (fluxkust.Patch, error)

func ChartURLToName

func ChartURLToName(repositoryURL string) (repositoryName string)

func FindHelmRepositoryByURL

func FindHelmRepositoryByURL(ctx context.Context, k8sClient client.Client, url, namespace string) (*sourcev1.HelmRepository, error)

func GetSourceRepositoryType

func GetSourceRepositoryType(repositoryURL string) string

func PrepareKustomizePatches added in v0.7.0

func PrepareKustomizePatches(overrides []greenhousev1alpha1.CatalogOverrides, group string) ([]fluxkust.Patch, error)

Types

type HelmReleaseBuilder

type HelmReleaseBuilder interface {
	WithChart(specRef helmv2.HelmChartTemplateSpec) *helmReleaseBuilder
	WithMaxHistory(num int) *helmReleaseBuilder
	WithInterval(duration time.Duration) *helmReleaseBuilder
	WithTimeout(timeout time.Duration) *helmReleaseBuilder
	WithValues(byteValues []byte) *helmReleaseBuilder
	WithValuesFrom(ref []helmv2.ValuesReference) *helmReleaseBuilder
	WithReleaseName(name string) *helmReleaseBuilder
	WithTargetNamespace(namespace string) *helmReleaseBuilder
	WithInstall(install *helmv2.Install) *helmReleaseBuilder
	WithUpgrade(upgrade *helmv2.Upgrade) *helmReleaseBuilder
	WithRollback(rollback *helmv2.Rollback) *helmReleaseBuilder
	WithDriftDetection(driftDetection *helmv2.DriftDetection) *helmReleaseBuilder
	WithSuspend(suspend bool) *helmReleaseBuilder
	WithTest(test *helmv2.Test) *helmReleaseBuilder
	WithUninstall(uninstall *helmv2.Uninstall) *helmReleaseBuilder
	WithDependsOn(dependencies []helmv2.DependencyReference) *helmReleaseBuilder
	WithKubeConfig(kc *fluxmeta.SecretKeyReference) *helmReleaseBuilder
	WithPostRenderers(postRenderers []helmv2.PostRenderer) *helmReleaseBuilder
	Build() (helmv2.HelmReleaseSpec, error)
}

func NewHelmReleaseSpecBuilder

func NewHelmReleaseSpecBuilder() HelmReleaseBuilder

type KustomizeBuilder added in v0.7.0

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

func NewKustomizationSpecBuilder added in v0.7.0

func NewKustomizationSpecBuilder(logger logr.Logger) *KustomizeBuilder

func (*KustomizeBuilder) Build added in v0.7.0

func (*KustomizeBuilder) WithCommonLabels added in v0.7.0

func (k *KustomizeBuilder) WithCommonLabels(labels map[string]string) *KustomizeBuilder

func (*KustomizeBuilder) WithPatches added in v0.7.0

func (k *KustomizeBuilder) WithPatches(patches []fluxkust.Patch) *KustomizeBuilder

func (*KustomizeBuilder) WithPath added in v0.7.0

func (k *KustomizeBuilder) WithPath(path string) *KustomizeBuilder

func (*KustomizeBuilder) WithServiceAccountName added in v0.7.0

func (k *KustomizeBuilder) WithServiceAccountName(name string) *KustomizeBuilder

func (*KustomizeBuilder) WithSourceRef added in v0.7.0

func (k *KustomizeBuilder) WithSourceRef(apiVersion, kind, name, namespace string) *KustomizeBuilder

func (*KustomizeBuilder) WithSuspend added in v0.7.0

func (k *KustomizeBuilder) WithSuspend(suspend bool) *KustomizeBuilder

func (*KustomizeBuilder) WithTargetNamespace added in v0.7.0

func (k *KustomizeBuilder) WithTargetNamespace(namespace string) *KustomizeBuilder

type Operation added in v0.7.0

type Operation struct {
	Op    string `json:"op"`
	Path  string `json:"path"`
	Value any    `json:"value,omitempty"`
}

Operation model for patch operations

Jump to

Keyboard shortcuts

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