internal

package
v0.1.0-alpha.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateResources

func GenerateResources(c *Config) ([]*client.Object, error)

GenerateResources creates Flux HelmRelease and source resources

Types

type ChartConfig

type ChartConfig struct {
	Name    string `yaml:"name" json:"name"`
	Version string `yaml:"version,omitempty" json:"version,omitempty"`
}

ChartConfig defines the Helm chart to deploy

type Config

type Config struct {
	Name      string `yaml:"name" json:"name"`
	Namespace string `yaml:"namespace,omitempty" json:"namespace,omitempty"`

	// Chart configuration
	Chart   ChartConfig `yaml:"chart" json:"chart"`
	Version string      `yaml:"version,omitempty" json:"version,omitempty"`
	Values  interface{} `yaml:"values,omitempty" json:"values,omitempty"`

	// Source configuration
	Source SourceConfig `yaml:"source" json:"source"`

	// Release configuration
	Release ReleaseConfig `yaml:"release,omitempty" json:"release,omitempty"`

	// Advanced options
	Interval       string         `yaml:"interval,omitempty" json:"interval,omitempty"`
	Timeout        string         `yaml:"timeout,omitempty" json:"timeout,omitempty"`
	MaxHistory     int            `yaml:"maxHistory,omitempty" json:"maxHistory,omitempty"`
	ServiceAccount string         `yaml:"serviceAccount,omitempty" json:"serviceAccount,omitempty"`
	Suspend        bool           `yaml:"suspend,omitempty" json:"suspend,omitempty"`
	DependsOn      []string       `yaml:"dependsOn,omitempty" json:"dependsOn,omitempty"`
	PostRenderers  []PostRenderer `yaml:"postRenderers,omitempty" json:"postRenderers,omitempty"`
}

Config represents the FluxHelm generator configuration

type KustomizeImage

type KustomizeImage struct {
	Name    string `yaml:"name" json:"name"`
	NewName string `yaml:"newName,omitempty" json:"newName,omitempty"`
	NewTag  string `yaml:"newTag,omitempty" json:"newTag,omitempty"`
}

KustomizeImage defines a Kustomize image substitution

type KustomizePatch

type KustomizePatch struct {
	Target *kustomize.Selector `yaml:"target,omitempty" json:"target,omitempty"`
	Patch  string              `yaml:"patch" json:"patch"`
}

KustomizePatch defines a Kustomize patch

type KustomizePostRenderer

type KustomizePostRenderer struct {
	Patches []KustomizePatch `yaml:"patches,omitempty" json:"patches,omitempty"`
	Images  []KustomizeImage `yaml:"images,omitempty" json:"images,omitempty"`
}

KustomizePostRenderer applies Kustomize patches as a post-render step

type PostRenderer

type PostRenderer struct {
	Kustomize *KustomizePostRenderer `yaml:"kustomize,omitempty" json:"kustomize,omitempty"`
}

PostRenderer defines a post-renderer for the Helm release

type ReleaseConfig

type ReleaseConfig struct {
	CreateNamespace          bool `yaml:"createNamespace,omitempty" json:"createNamespace,omitempty"`
	DisableWait              bool `yaml:"disableWait,omitempty" json:"disableWait,omitempty"`
	DisableWaitForJobs       bool `yaml:"disableWaitForJobs,omitempty" json:"disableWaitForJobs,omitempty"`
	DisableHooks             bool `yaml:"disableHooks,omitempty" json:"disableHooks,omitempty"`
	DisableOpenAPIValidation bool `yaml:"disableOpenAPIValidation,omitempty" json:"disableOpenAPIValidation,omitempty"`
	ResetValues              bool `yaml:"resetValues,omitempty" json:"resetValues,omitempty"`
	ForceUpgrade             bool `yaml:"forceUpgrade,omitempty" json:"forceUpgrade,omitempty"`
	PreserveValues           bool `yaml:"preserveValues,omitempty" json:"preserveValues,omitempty"`
	CleanupOnFail            bool `yaml:"cleanupOnFail,omitempty" json:"cleanupOnFail,omitempty"`
	Replace                  bool `yaml:"replace,omitempty" json:"replace,omitempty"`
}

ReleaseConfig defines Helm release options

type SourceConfig

type SourceConfig struct {
	Type SourceType `yaml:"type" json:"type"`

	// HelmRepository specific
	URL string `yaml:"url,omitempty" json:"url,omitempty"`

	// GitRepository specific
	GitURL  string `yaml:"gitUrl,omitempty" json:"gitUrl,omitempty"`
	GitRef  string `yaml:"gitRef,omitempty" json:"gitRef,omitempty"`
	GitPath string `yaml:"gitPath,omitempty" json:"gitPath,omitempty"`

	// OCIRepository specific
	OCIUrl string `yaml:"ociUrl,omitempty" json:"ociUrl,omitempty"`

	// Bucket specific
	BucketName string `yaml:"bucketName,omitempty" json:"bucketName,omitempty"`
	Endpoint   string `yaml:"endpoint,omitempty" json:"endpoint,omitempty"`
	Region     string `yaml:"region,omitempty" json:"region,omitempty"`

	// Authentication
	SecretRef string `yaml:"secretRef,omitempty" json:"secretRef,omitempty"`

	// Common
	Interval string `yaml:"interval,omitempty" json:"interval,omitempty"`
}

SourceConfig defines where to fetch the Helm chart from

type SourceType

type SourceType string

SourceType represents the type of Helm chart source

const (
	// HelmRepositorySource indicates a Helm repository source
	HelmRepositorySource SourceType = "HelmRepository"
	// GitRepositorySource indicates a Git repository source
	GitRepositorySource SourceType = "GitRepository"
	// BucketSource indicates an S3-compatible bucket source
	BucketSource SourceType = "Bucket"
	// OCIRepositorySource indicates an OCI registry source
	OCIRepositorySource SourceType = "OCIRepository"
)

Jump to

Keyboard shortcuts

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