Documentation
¶
Index ¶
- Constants
- Variables
- func ComputeHash(chart operatorv1alpha1.HelmChartSpec, values map[string]interface{}) (string, error)
- func MergeValues(ctx context.Context, c client.Client, namespace string, ...) (map[string]interface{}, error)
- func NewSubReconcilers(c client.Client, scheme *runtime.Scheme, helmClient Client) *subreconciler.Chain[*operatorv1alpha1.HelmCapsule]
- type ChartCredentials
- type Client
- type ReleaseInfo
- type ReleaseOptions
- type ReleaseSubReconciler
- type UninstallOptions
Constants ¶
View Source
const (
DefaultTimeout = 5 * time.Minute
)
Variables ¶
Functions ¶
func ComputeHash ¶
func ComputeHash(chart operatorv1alpha1.HelmChartSpec, values map[string]interface{}) (string, error)
ComputeHash returns a SHA-256 of chart spec + values, used in status.ValuesHash to skip no-op upgrades.
func MergeValues ¶
func MergeValues(ctx context.Context, c client.Client, namespace string, spec *operatorv1alpha1.HelmCapsuleSpec) (map[string]interface{}, error)
MergeValues assembles the final values by layering component injection, ValuesFrom refs, and inline values.
func NewSubReconcilers ¶
func NewSubReconcilers(c client.Client, scheme *runtime.Scheme, helmClient Client) *subreconciler.Chain[*operatorv1alpha1.HelmCapsule]
Types ¶
type ChartCredentials ¶
ChartCredentials is read from the Secret named in HelmChartSpec.CredentialsRef.
type Client ¶
type Client interface {
InstallOrUpgrade(ctx context.Context, releaseName, namespace string, chart operatorv1alpha1.HelmChartSpec, values map[string]interface{}, opts ReleaseOptions) (*ReleaseInfo, error)
Uninstall(ctx context.Context, releaseName, namespace string, opts UninstallOptions) error
GetRelease(releaseName, namespace string) (*ReleaseInfo, error)
}
Client abstracts Helm operations for testability.
func NewHelmSDKClient ¶
NewHelmSDKClient returns a Client backed by helm.sh/helm/v3. Pass mgr.GetConfig().
type ReleaseInfo ¶
type ReleaseOptions ¶
type ReleaseOptions struct {
Timeout time.Duration
Wait bool
Atomic bool
CleanupOnFail bool
MaxHistory int
DisableHooks bool
// Credentials are used to authenticate to a private chart repository.
// Nil means no authentication (public repo).
Credentials *ChartCredentials
}
ReleaseOptions maps to HelmCapsuleSpec fields. Zero values match Helm defaults.
type ReleaseSubReconciler ¶
type ReleaseSubReconciler struct {
*subreconciler.BaseSubReconciler[*operatorv1alpha1.HelmCapsule]
// contains filtered or unexported fields
}
func (*ReleaseSubReconciler) Name ¶
func (r *ReleaseSubReconciler) Name() string
func (*ReleaseSubReconciler) Reconcile ¶
func (r *ReleaseSubReconciler) Reconcile(ctx context.Context, hc *operatorv1alpha1.HelmCapsule) (ctrl.Result, error)
Click to show internal directories.
Click to hide internal directories.