addons

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAddon

func GenerateAddon(addons embed.FS, provider, addon, dest string, addonConfig AddonConfig, templateWriter templatewriter.TemplateWriter) error

func GetAddonPath

func GetAddonPath(addons embed.FS, provider, addon string) (string, error)

func PromptAddon

func PromptAddon(addons embed.FS, provider string) (string, error)

func PromptAddonValues

func PromptAddonValues(dest string, addonConfig *AddonConfig) error

Types

type AddonConfig

type AddonConfig struct {
	*config.DraftConfig `yaml:",inline"`
	ReferenceComponents map[string][]referenceResource `yaml:"references"`
	// contains filtered or unexported fields
}

AddonConfig is a struct that extends the base DraftConfig to allow for the Referencing previously generated k8s objects. This allows an addon creator to reference pre-entered data from the deployment files.

func GetAddonConfig

func GetAddonConfig(addons embed.FS, provider, addon string) (AddonConfig, error)

func (*AddonConfig) GetAddonDestPath

func (ac *AddonConfig) GetAddonDestPath(dest string) (string, error)

func (*AddonConfig) GetReferenceValueMap

func (ac *AddonConfig) GetReferenceValueMap(dest string) (map[string]string, error)

GetReferenceValueMap extracts k8s object values into a mapping of template strings to k8s object value.

type Reference

type Reference interface {
	GetReferenceVariables([]referenceResource) map[string]string
}

Jump to

Keyboard shortcuts

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