Documentation
¶
Index ¶
- Constants
- func NewOwnerReferencePostRenderer(ownerReference metav1.OwnerReference, ownerNamespace string) postrender.PostRenderer
- func NewRESTClientGetter(config *rest.Config) genericclioptions.RESTClientGetter
- func ToValues[V any](helmValues Values, values V) (V, error)
- type ChartManager
- type OwnerReferencePostRenderer
- type Values
Constants ¶
const ( AnnotationPrimaryResource = "operator-sdk/primary-resource" AnnotationPrimaryResourceType = "operator-sdk/primary-resource-type" )
Variables ¶
This section is empty.
Functions ¶
func NewOwnerReferencePostRenderer ¶
func NewOwnerReferencePostRenderer(ownerReference metav1.OwnerReference, ownerNamespace string) postrender.PostRenderer
NewOwnerReferencePostRenderer creates a Helm PostRenderer that adds the specified OwnerReference to each rendered manifest
func NewRESTClientGetter ¶
func NewRESTClientGetter(config *rest.Config) genericclioptions.RESTClientGetter
Types ¶
type ChartManager ¶
type ChartManager struct {
// contains filtered or unexported fields
}
func NewChartManager ¶
func NewChartManager(cfg *rest.Config, driver string) *ChartManager
NewChartManager creates a new Helm chart manager using cfg as the configuration that Helm will use to connect to the cluster when installing or uninstalling charts, and using the specified driver to store information about releases (one of: memory, secret, configmap, sql, or "" (same as "secret")).
func (*ChartManager) UninstallChart ¶
func (h *ChartManager) UninstallChart(ctx context.Context, releaseName, namespace string) (*release.UninstallReleaseResponse, error)
UninstallChart removes a chart from the cluster
func (*ChartManager) UpgradeOrInstallChart ¶
func (h *ChartManager) UpgradeOrInstallChart( ctx context.Context, chartDir string, values Values, namespace, releaseName string, ownerReference metav1.OwnerReference, ) (*release.Release, error)
UpgradeOrInstallChart upgrades a chart in cluster or installs it new if it does not already exist
type OwnerReferencePostRenderer ¶
type OwnerReferencePostRenderer struct {
// contains filtered or unexported fields
}
type Values ¶
func FromValues ¶
func (*Values) GetBool ¶
GetBool returns the bool value of a nested field. Returns false if value is not found and an error if not a bool.
func (*Values) GetString ¶
GetString returns the string value of a nested field. Returns false if value is not found and an error if not a string.
func (*Values) Set ¶
Set sets the value of a nested field to a deep copy of the value provided. Returns an error if value cannot be set because one of the nesting levels is not a map[string]any.
func (*Values) SetIfAbsent ¶
SetIfAbsent sets the value of a nested field to a deep copy of the value provided if the field does not exist.