Documentation
¶
Index ¶
- Constants
- Variables
- func ReadOrGenerateSSHKey(basedir string, name string, comment string) (string, error)
- func RunRecipe(basedir string, steps []string, dryRun bool) error
- func UnpackFile(basedir string, name string) error
- type AddBuildOp
- type AddRunOp
- type BuildOp
- type Bundle
- type Cache
- type Component
- type ContentGenerator
- func FromKubeObjects(objs ...KubeObjectProvider) ContentGenerator
- func FromTemplate(tmplText string, dataBuilder ...any) ContentGenerator
- func FromValue(value string) ContentGenerator
- func IgnitionFromButaneTemplate(tmplText string, dataBuilder ...any) ContentGenerator
- func YAMLFrom(obj any) ContentGenerator
- type ExecCommand
- type File
- type FileGenerate
- type FilesORAS
- type GetComponent
- type InstallFile
- type KeyPair
- type KubeObjectProvider
- func KubeConfigMap(name, ns string, values ...any) KubeObjectProvider
- func KubeHelmChart(name, ns string, spec helm.HelmChartSpec, valuesGenerator ...ContentGenerator) KubeObjectProvider
- func KubeSecret(name, ns string, data map[string]string) KubeObjectProvider
- func KubeService(name, ns string, spec core.ServiceSpec) KubeObjectProvider
- type Manager
- func (mngr *Manager) Build(pack bool) error
- func (mngr *Manager) Dump() error
- func (mngr *Manager) Flags() []cli.Flag
- func (mngr *Manager) Init(basedir string, fromConfig string, preset Preset, fabricMode config.FabricMode, ...) error
- func (mngr *Manager) Load(basedir string) error
- func (mngr *Manager) Pack() error
- func (mngr *Manager) Preset() Preset
- func (mngr *Manager) Save() error
- func (mngr *Manager) Wiring() *wiring.Data
- type ManagerSaver
- type Preset
- type PushOCI
- type Recipe
- type RecipeAction
- type RecipeSaver
- type RecipeSaverItem
- type Ref
- type RunOp
- type Stage
- type SyncOCI
- type WaitKube
- type WaitParams
- type WaitURL
Constants ¶
View Source
const ( BLOCK_TYPE_CERT = "CERTIFICATE" BLOCK_TYPE_KEY = "EC PRIVATE KEY" )
View Source
const CACHE_FILE = "cache.yaml"
Variables ¶
View Source
var RunOpsList = []RunOp{ &InstallFile{}, &ExecCommand{}, &WaitURL{}, &PushOCI{}, &WaitKube{}, }
Functions ¶
func ReadOrGenerateSSHKey ¶
func UnpackFile ¶
Types ¶
type Component ¶
type Component interface { Name() string IsEnabled(preset Preset) bool Flags() []cli.Flag // set defaults and validate saveable config // called on each init/load, should set values the makes sense for user to change // e.g. if we need to set TLS SAN to some value for system to work, it shouldn't be set here // e.g. if we need some things to be available for user to change, it should be set here // e.g. if we want other components to be able to use some values of that component config - it should be here // e.g. generate TLS certificates // if we want to make sure that same value is used on every build - it should be set here Hydrate(preset Preset, fabricMode config.FabricMode) error // TODO rename run -> build, install -> run? Build(basedir string, preset Preset, fabricMode config.FabricMode, get GetComponent, wiring *wiring.Data, run AddBuildOp, install AddRunOp) error }
type ContentGenerator ¶
func FromKubeObjects ¶
func FromKubeObjects(objs ...KubeObjectProvider) ContentGenerator
func FromTemplate ¶
func FromTemplate(tmplText string, dataBuilder ...any) ContentGenerator
func FromValue ¶
func FromValue(value string) ContentGenerator
func IgnitionFromButaneTemplate ¶
func IgnitionFromButaneTemplate(tmplText string, dataBuilder ...any) ContentGenerator
func YAMLFrom ¶ added in v0.6.0
func YAMLFrom(obj any) ContentGenerator
type ExecCommand ¶
type ExecCommand struct { Name string `json:"name,omitempty"` Args []string `json:"args,omitempty"` Env []string `json:"env,omitempty"` Dir string `json:"dir,omitempty"` }
func (*ExecCommand) Hydrate ¶
func (op *ExecCommand) Hydrate() error
func (*ExecCommand) Run ¶
func (op *ExecCommand) Run(basedir string) error
func (*ExecCommand) Summary ¶
func (op *ExecCommand) Summary() string
type FileGenerate ¶
type FileGenerate struct { File File Content ContentGenerator }
func (*FileGenerate) Build ¶
func (op *FileGenerate) Build(basedir string) error
func (*FileGenerate) Hydrate ¶
func (op *FileGenerate) Hydrate() error
func (*FileGenerate) RunOps ¶
func (op *FileGenerate) RunOps() []RunOp
type GetComponent ¶
type InstallFile ¶
type InstallFile struct { Name string `json:"name,omitempty"` Target string `json:"target,omitempty"` TargetName string `json:"targetName,omitempty"` Mode os.FileMode `json:"mode,omitempty"` MkdirMode os.FileMode `json:"mkdirMode,omitempty"` }
func (*InstallFile) Hydrate ¶
func (op *InstallFile) Hydrate() error
func (*InstallFile) Run ¶
func (op *InstallFile) Run(basedir string) error
func (*InstallFile) Summary ¶
func (op *InstallFile) Summary() string
func (*InstallFile) TargetPath ¶
func (op *InstallFile) TargetPath() string
type KubeObjectProvider ¶
func KubeConfigMap ¶
func KubeConfigMap(name, ns string, values ...any) KubeObjectProvider
func KubeHelmChart ¶
func KubeHelmChart(name, ns string, spec helm.HelmChartSpec, valuesGenerator ...ContentGenerator) KubeObjectProvider
func KubeSecret ¶
func KubeSecret(name, ns string, data map[string]string) KubeObjectProvider
func KubeService ¶
func KubeService(name, ns string, spec core.ServiceSpec) KubeObjectProvider
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
type ManagerSaver ¶
type ManagerSaver struct { Preset Preset `json:"preset,omitempty"` FabricMode config.FabricMode `json:"fabricMode,omitempty"` Config map[string]any `json:"config,omitempty"` }
type Recipe ¶
type Recipe struct {
Actions []RecipeAction
}
type RecipeAction ¶
type RecipeSaver ¶
type RecipeSaver struct {
Actions []RecipeSaverItem `json:"recipe,omitempty"`
}
type RecipeSaverItem ¶
type Ref ¶
type Ref struct { Repo string `json:"repo,omitempty"` Name string `json:"name,omitempty"` Tag string `json:"tag,omitempty"` }
func (Ref) IsLocalhost ¶ added in v0.6.0
func (Ref) StrictValidate ¶
type WaitKube ¶
type WaitParams ¶
type WaitParams struct { Delay time.Duration `json:"delay,omitempty"` Interval time.Duration `json:"interval,omitempty"` Attempts int `json:"attempts,omitempty"` }
func (*WaitParams) Hydrate ¶
func (w *WaitParams) Hydrate() error
func (*WaitParams) Wait ¶
func (w *WaitParams) Wait(checker func() error) error
type WaitURL ¶
type WaitURL struct { Wait WaitParams `json:"wait,omitempty"` URL string `json:"url,omitempty"` StatusCode int `json:"statusCode,omitempty"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.