Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CRDsPolicy ¶
type CRDsPolicy string
CRDsPolicy defines the install/upgrade approach for CRDs bundled with a Helm chart.
const ( // CRDsPolicySkip skips CRD installation and updates. CRDsPolicySkip CRDsPolicy = "Skip" // CRDsPolicyCreate creates new CRDs but does not update existing ones. CRDsPolicyCreate CRDsPolicy = "Create" // CRDsPolicyCreateReplace creates new CRDs and replaces (updates) existing ones. CRDsPolicyCreateReplace CRDsPolicy = "CreateReplace" )
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 ChartRefConfig ¶
type ChartRefConfig struct {
Kind string `yaml:"kind" json:"kind"`
Name string `yaml:"name" json:"name"`
Namespace string `yaml:"namespace,omitempty" json:"namespace,omitempty"`
}
ChartRefConfig defines a reference to an existing OCIRepository or HelmChart resource
type Config ¶
type Config struct {
Name string `yaml:"name" json:"name"`
Namespace string `yaml:"namespace,omitempty" json:"namespace,omitempty"`
// HelmRelease metadata overrides
TargetNamespace string `yaml:"targetNamespace,omitempty" json:"targetNamespace,omitempty"`
ReleaseName string `yaml:"releaseName,omitempty" json:"releaseName,omitempty"`
// Chart configuration
Chart ChartConfig `yaml:"chart" json:"chart"`
Version string `yaml:"version,omitempty" json:"version,omitempty"`
Values any `yaml:"values,omitempty" json:"values,omitempty"`
ValuesFrom []ValuesReference `yaml:"valuesFrom,omitempty" json:"valuesFrom,omitempty"`
// Source configuration
Source SourceConfig `yaml:"source" json:"source"`
// Release configuration
Release ReleaseConfig `yaml:"release,omitempty" json:"release"`
// ChartRef references an existing OCIRepository or HelmChart (mutually exclusive with Chart)
ChartRef *ChartRefConfig `yaml:"chartRef,omitempty" json:"chartRef,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"`
// CRD lifecycle policies
InstallCRDs CRDsPolicy `yaml:"installCRDs,omitempty" json:"installCRDs,omitempty"`
UpgradeCRDs CRDsPolicy `yaml:"upgradeCRDs,omitempty" json:"upgradeCRDs,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"`
// RefName overrides the default source resource name ("{config.Name}-source").
// When set, the source resource and HelmRelease sourceRef use this name instead.
RefName string `yaml:"refName,omitempty" json:"refName,omitempty"`
// SkipGeneration prevents creation of the source resource (reference-only mode).
// The HelmRelease sourceRef still points to RefName (or the default name).
SkipGeneration bool `yaml:"skipGeneration,omitempty" json:"skipGeneration,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" )
type ValuesReference ¶
type ValuesReference struct {
// Kind of the values referent (ConfigMap or Secret).
Kind string `yaml:"kind" json:"kind"`
// Name of the values referent.
Name string `yaml:"name" json:"name"`
// ValuesKey is the data key where values.yaml can be found. Defaults to "values.yaml".
ValuesKey string `yaml:"valuesKey,omitempty" json:"valuesKey,omitempty"`
// TargetPath is the YAML dot notation path at which the value should be merged.
TargetPath string `yaml:"targetPath,omitempty" json:"targetPath,omitempty"`
// Optional marks the reference as optional — missing referent does not cause failure.
Optional bool `yaml:"optional,omitempty" json:"optional,omitempty"`
}
ValuesReference defines a reference to a resource from which Helm values are sourced.