client

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 39 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPostRendererFunc = func(rm meta.RESTMapper, kubeClient kube.Interface, owner client.Object) postrender.PostRenderer {
	return &ownerPostRenderer{rm, kubeClient, owner}
}

DefaultPostRendererFunc returns a post-renderer that applies owner references to compatible objects in a helm release manifest. This is the default post-renderer used by ActionClients created with NewActionClientGetter.

Functions

This section is empty.

Types

type ActionClientGetter

type ActionClientGetter interface {
	ActionClientFor(obj client.Object) (ActionInterface, error)
}

type ActionClientGetterFunc

type ActionClientGetterFunc func(obj client.Object) (ActionInterface, error)

func (ActionClientGetterFunc) ActionClientFor

func (acgf ActionClientGetterFunc) ActionClientFor(obj client.Object) (ActionInterface, error)

type ActionClientGetterOption added in v0.1.0

type ActionClientGetterOption func(*actionClientGetter) error

func AppendGetOptions added in v0.1.0

func AppendGetOptions(opts ...GetOption) ActionClientGetterOption

func AppendInstallFailureUninstallOptions added in v0.1.0

func AppendInstallFailureUninstallOptions(opts ...UninstallOption) ActionClientGetterOption

func AppendInstallOptions added in v0.1.0

func AppendInstallOptions(opts ...InstallOption) ActionClientGetterOption

func AppendPostRenderers added in v0.1.0

func AppendPostRenderers(postRendererFns ...PostRendererProvider) ActionClientGetterOption

func AppendUninstallOptions added in v0.1.0

func AppendUninstallOptions(opts ...UninstallOption) ActionClientGetterOption

func AppendUpgradeFailureRollbackOptions added in v0.1.0

func AppendUpgradeFailureRollbackOptions(opts ...RollbackOption) ActionClientGetterOption

func AppendUpgradeOptions added in v0.1.0

func AppendUpgradeOptions(opts ...UpgradeOption) ActionClientGetterOption

type ActionConfigGetter

type ActionConfigGetter interface {
	ActionConfigFor(obj client.Object) (*action.Configuration, error)
}

func NewActionConfigGetter

func NewActionConfigGetter(cfg *rest.Config, rm meta.RESTMapper, log logr.Logger, opts ...ActionConfigGetterOption) (ActionConfigGetter, error)

type ActionConfigGetterOption added in v0.1.0

type ActionConfigGetterOption func(getter *actionConfigGetter)

func ClientNamespaceMapper added in v0.1.0

func ClientNamespaceMapper(m ObjectToStringMapper) ActionConfigGetterOption

func DisableStorageOwnerRefInjection added in v0.1.0

func DisableStorageOwnerRefInjection(v bool) ActionConfigGetterOption

func StorageNamespaceMapper added in v0.1.0

func StorageNamespaceMapper(m ObjectToStringMapper) ActionConfigGetterOption

type ActionInterface

type ActionInterface interface {
	Get(name string, opts ...GetOption) (*release.Release, error)
	Install(name, namespace string, chrt *chart.Chart, vals map[string]interface{}, opts ...InstallOption) (*release.Release, error)
	Upgrade(name, namespace string, chrt *chart.Chart, vals map[string]interface{}, opts ...UpgradeOption) (*release.Release, error)
	Uninstall(name string, opts ...UninstallOption) (*release.UninstallReleaseResponse, error)
	Reconcile(rel *release.Release) error
}

type GetOption

type GetOption func(*action.Get) error

type InstallOption

type InstallOption func(*action.Install) error

func AppendInstallPostRenderer added in v0.1.0

func AppendInstallPostRenderer(pr postrender.PostRenderer) InstallOption

AppendInstallPostRenderer appends a post-renderer to the existing chain of post-renderers configured for the install. This function should be used instead of WithInstallPostRenderer if you want to inherit the default set of post-renderers configured by an ActionClientGetter.

func WithInstallPostRenderer added in v0.1.0

func WithInstallPostRenderer(pr postrender.PostRenderer) InstallOption

WithInstallPostRenderer sets the post-renderer to use for the install. It overrides any post-renderer that may already be configured or set as a default.

type ObjectToStringMapper added in v0.1.0

type ObjectToStringMapper func(client.Object) (string, error)

type PostRendererFunc added in v0.1.0

type PostRendererFunc func(buffer *bytes.Buffer) (*bytes.Buffer, error)

PostRendererFunc defines a function signature that implements helm's PostRenderer interface.

func (PostRendererFunc) Run added in v0.1.0

func (f PostRendererFunc) Run(buffer *bytes.Buffer) (*bytes.Buffer, error)

Run runs the post-renderer function.

type PostRendererProvider added in v0.1.0

type PostRendererProvider func(rm meta.RESTMapper, kubeClient kube.Interface, obj client.Object) postrender.PostRenderer

PostRendererProvider is a function that returns a post-renderer for a given object. obj represents the custom resource that is being reconciled.

type RollbackOption added in v0.1.0

type RollbackOption func(*action.Rollback) error

type UninstallOption

type UninstallOption func(*action.Uninstall) error

type UpgradeOption

type UpgradeOption func(*action.Upgrade) error

func AppendUpgradePostRenderer added in v0.1.0

func AppendUpgradePostRenderer(pr postrender.PostRenderer) UpgradeOption

AppendUpgradePostRenderer appends a post-renderer to the existing chain of post-renderers configured for the upgrade. This function should be used instead of WithUpgradePostRenderer if you want to inherit the default set of post-renderers configured by an ActionClientGetter.

func WithUpgradePostRenderer added in v0.1.0

func WithUpgradePostRenderer(pr postrender.PostRenderer) UpgradeOption

WithUpgradePostRenderer sets the post-renderer to use for the upgrade. It overrides any post-renderer that may already be configured or set as a default.

Jump to

Keyboard shortcuts

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