application

package
v0.1.62 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Customizer

type Customizer interface {
	Customize(version *string) ([]cd.HelmApplicationField, error)
}

Customizer is a generic generator interface that implemnets raw customizations to the application template. Try to avoid using this.

type GetterFunc

type GetterFunc func(ctx context.Context) (*unikornv1.ApplicationReference, error)

ApplicationGetter abstracts away how an application is looked up for a specific entity. Where user defined and unikorn defined application bundles collide is at the ApplicationReference, so that's where we hook in this abstraction.

type Paramterizer

type Paramterizer interface {
	Parameters(ctx context.Context, version *string) (map[string]string, error)
}

Paramterizer is an interface that allows generators to supply a list of parameters to Helm. These are in addition to those defined by the application template. At present, there is nothing special about overriding, it just appends, so ensure the explicit and implicit sets don't overlap.

type PostProvisionHook

type PostProvisionHook interface {
	PostProvision(ctx context.Context) error
}

PostProvisionHook is an interface that lets an application provisioner run a callback when provisioning has completed successfully.

type Provisioner

type Provisioner struct {
	// Metadata defines the application name, this directly affects
	// the application what will be searched for in the application bundle
	// defined in the resource.  It will also be the default Application ID
	// name, unless overridden by Name.
	provisioners.Metadata
	// contains filtered or unexported fields
}

Provisioner deploys an application that is keyed to a specific resource. For example, ArgoCD dictates that applications be installed in the same namespace, so we use the resource to define a unique set of labels that identifies that resource out of all others, and add in the application name to uniquely identify the application within that resource.

func New

func New(getApplicationReference GetterFunc) *Provisioner

New returns a new initialized provisioner object. Note as the application lookup is dynamic, we need to defer initialization until later in the provisioning to keep top-level interfaces clean.

func (*Provisioner) AllowDegraded

func (p *Provisioner) AllowDegraded() *Provisioner

AllowDegraded accepts a degraded status as a success for an application.

func (*Provisioner) Deprovision

func (p *Provisioner) Deprovision(ctx context.Context) error

Deprovision implements the Provision interface.

func (*Provisioner) InNamespace

func (p *Provisioner) InNamespace(namespace string) *Provisioner

InNamespace deploys the application into an explicit namespace.

func (*Provisioner) Provision

func (p *Provisioner) Provision(ctx context.Context) error

Provision implements the Provision interface.

func (*Provisioner) WithGenerator

func (p *Provisioner) WithGenerator(generator interface{}) *Provisioner

WithGenerator registers an object that can generate implicit configuration where you cannot do it all from the default set of arguments.

type ReleaseNamer

type ReleaseNamer interface {
	ReleaseName(ctx context.Context) string
}

ReleaseNamer is an interface that allows generators to supply an implicit release name to Helm.

type ValuesGenerator

type ValuesGenerator interface {
	Values(ctx context.Context, version *string) (interface{}, error)
}

ValuesGenerator is an interface that allows generators to supply a raw values.yaml file to Helm. This accepts an object that can be marshaled to YAML.

Jump to

Keyboard shortcuts

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