Documentation ¶
Index ¶
- func FromContext(ctx context.Context) unikornv1.ManagableResourceInterface
- func NewContext(ctx context.Context, resource unikornv1.ManagableResourceInterface) context.Context
- type Customizer
- type GetterFunc
- type Paramterizer
- type PostProvisionHook
- type Provisioner
- func (p *Provisioner) AllowDegraded() *Provisioner
- func (p *Provisioner) Deprovision(ctx context.Context) error
- func (p *Provisioner) InNamespace(namespace string) *Provisioner
- func (p *Provisioner) Provision(ctx context.Context) error
- func (p *Provisioner) WithGenerator(generator interface{}) *Provisioner
- type ReleaseNamer
- type ValuesGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
func FromContext(ctx context.Context) unikornv1.ManagableResourceInterface
func NewContext ¶
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 ¶
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 ¶
ReleaseNamer is an interface that allows generators to supply an implicit release name to Helm.