Documentation ¶
Index ¶
- Variables
- func GetPluginOptionValuesForPlugin(ctx context.Context, c client.Client, plugin *greenhousev1alpha1.Plugin) ([]greenhousev1alpha1.PluginOptionValue, error)
- func GetReleaseForHelmChartFromPlugin(_ context.Context, restClientGetter genericclioptions.RESTClientGetter, ...) (*release.Release, error)
- func InstallOrUpgradeHelmChartFromPlugin(ctx context.Context, local client.Client, ...) error
- func ObjectMapFromManifest(restClientGetter genericclioptions.RESTClientGetter, ...) (map[ObjectKey]*ManifestObject, error)
- func ObjectMapFromRelease(restClientGetter genericclioptions.RESTClientGetter, r *release.Release, ...) (map[ObjectKey]*ManifestObject, error)
- func ResetHelmReleaseStatusToDeployed(ctx context.Context, restClientGetter genericclioptions.RESTClientGetter, ...) error
- func TemplateHelmChartFromPlugin(ctx context.Context, local client.Client, ...) (string, error)
- func UninstallHelmRelease(ctx context.Context, restClientGetter genericclioptions.RESTClientGetter, ...) (releaseNotFound bool, err error)
- type ChartLoaderFunc
- type DiffObject
- type DiffObjectList
- type ManifestFilter
- type ManifestMultipleObjectFilter
- type ManifestObject
- type ManifestObjectFilter
- type ObjectKey
- type ObjectList
Constants ¶
This section is empty.
Variables ¶
var ( ExportGetValuesForHelmChart = getValuesForHelmChart ExportNewHelmAction = newHelmAction ExportDiffAgainstLiveObjects = diffAgainstLiveObjects ExportConfigureChartPathOptions = configureChartPathOptions ExportGreenhouseFieldManager = greenhouseFieldManager ExportDiffAgainstRelease = diffAgainstRelease ExportInstallHelmRelease = installRelease )
var ( // IsHelmDebug is configured via a flag and enables extensive debug logging for Helm actions. IsHelmDebug bool )
Functions ¶
func GetPluginOptionValuesForPlugin ¶
func GetPluginOptionValuesForPlugin(ctx context.Context, c client.Client, plugin *greenhousev1alpha1.Plugin) ([]greenhousev1alpha1.PluginOptionValue, error)
func GetReleaseForHelmChartFromPlugin ¶
func GetReleaseForHelmChartFromPlugin(_ context.Context, restClientGetter genericclioptions.RESTClientGetter, plugin *greenhousev1alpha1.Plugin) (*release.Release, error)
GetReleaseForHelmChartFromPlugin returns the Helm release for the given Plugin or an error.
func InstallOrUpgradeHelmChartFromPlugin ¶
func InstallOrUpgradeHelmChartFromPlugin(ctx context.Context, local client.Client, restClientGetter genericclioptions.RESTClientGetter, pluginDefinition *greenhousev1alpha1.PluginDefinition, plugin *greenhousev1alpha1.Plugin) error
InstallOrUpgradeHelmChartFromPlugin installs a new or upgrades an existing Helm release for the given PluginDefinition and Plugin.
func ObjectMapFromManifest ¶
func ObjectMapFromManifest(restClientGetter genericclioptions.RESTClientGetter, namespace, manifest string, f ManifestFilter) (map[ObjectKey]*ManifestObject, error)
ObjectMapFromManifest returns a map of objects from the manifests matching the filter or an error.
func ObjectMapFromRelease ¶
func ObjectMapFromRelease(restClientGetter genericclioptions.RESTClientGetter, r *release.Release, f ManifestFilter) (map[ObjectKey]*ManifestObject, error)
ObjectMapFromRelease returns a map of objects from the helm release manifest matching the filter or an error.
func ResetHelmReleaseStatusToDeployed ¶
func ResetHelmReleaseStatusToDeployed(ctx context.Context, restClientGetter genericclioptions.RESTClientGetter, plugin *greenhousev1alpha1.Plugin) error
ResetHelmReleaseStatusToDeployed resets the status of the release to deployed using a rollback.
func TemplateHelmChartFromPlugin ¶
func TemplateHelmChartFromPlugin(ctx context.Context, local client.Client, restClientGetter genericclioptions.RESTClientGetter, pluginDefinition *greenhousev1alpha1.PluginDefinition, plugin *greenhousev1alpha1.Plugin) (string, error)
TemplateHelmChartFromPlugin returns the rendered manifest or an error.
func UninstallHelmRelease ¶
func UninstallHelmRelease(ctx context.Context, restClientGetter genericclioptions.RESTClientGetter, plugin *greenhousev1alpha1.Plugin) (releaseNotFound bool, err error)
UninstallHelmRelease removes the Helm release for the given Plugin.
Types ¶
type ChartLoaderFunc ¶
var ChartLoader ChartLoaderFunc = loader.Load
type DiffObject ¶
type DiffObject struct { // Name is the GVK and namespaced name of the involved Kubernetes object. Name, Diff string }
DiffObject is a Kubernetes object where the deployed state differs from the one in the Helm chart manifest.
type DiffObjectList ¶
type DiffObjectList []DiffObject
DiffObjectList is a list of DiffObjects.
func DiffChartToDeployedResources ¶
func DiffChartToDeployedResources(ctx context.Context, local client.Client, restClientGetter genericclioptions.RESTClientGetter, pluginDefinition *greenhousev1alpha1.PluginDefinition, plugin *greenhousev1alpha1.Plugin) (diffs DiffObjectList, isDrift bool, err error)
DiffChartToDeployedResources returns whether the Kubernetes objects, as specified in the Helm chart manifest, differ from the deployed state.
func (DiffObjectList) String ¶
func (d DiffObjectList) String() string
String returns the string of the DiffObjectList.
type ManifestFilter ¶
type ManifestMultipleObjectFilter ¶
type ManifestMultipleObjectFilter struct {
Filters []ManifestObjectFilter
}
type ManifestObject ¶
ManifestObject represents an object in a Helm manifest.
type ManifestObjectFilter ¶
ManifestObjectFilter is used to filter for objects in a Helm manifest.
type ObjectKey ¶
type ObjectKey struct { GVK schema.GroupVersionKind Namespace string Name string }
ObjectKey is a unique key for a ManifestObject.
type ObjectList ¶
type ObjectList struct { ObjectKey *ManifestObject }