Documentation ¶
Overview ¶
Package bundle provides a set of machine configuration files.
Index ¶
- type Bundle
- func (bundle *Bundle) ApplyPatches(patches []configpatcher.Patch, patchControlPlane, patchWorker bool) error
- func (bundle *Bundle) ControlPlane() config.Provider
- func (bundle *Bundle) Init() config.Provider
- func (bundle *Bundle) Serialize(commentsFlags encoder.CommentsFlags, machineType machine.Type) ([]byte, error)
- func (bundle *Bundle) TalosConfig() *clientconfig.Config
- func (bundle *Bundle) Worker() config.Provider
- func (bundle *Bundle) Write(outputDir string, commentsFlags encoder.CommentsFlags, types ...machine.Type) error
- type InputOptions
- type Option
- func WithExistingConfigs(configPath string) Option
- func WithInputOptions(inputOpts *InputOptions) Option
- func WithPatch(patch []configpatcher.Patch) Option
- func WithPatchControlPlane(patch []configpatcher.Patch) Option
- func WithPatchWorker(patch []configpatcher.Patch) Option
- func WithVerbose(verbose bool) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type Bundle struct { InitCfg config.Provider ControlPlaneCfg config.Provider WorkerCfg config.Provider TalosCfg *clientconfig.Config }
Bundle defines a set of machine configuration files.
func (*Bundle) ApplyPatches ¶
func (bundle *Bundle) ApplyPatches(patches []configpatcher.Patch, patchControlPlane, patchWorker bool) error
ApplyPatches patches every config type with a patch.
func (*Bundle) ControlPlane ¶
ControlPlane implements the ProviderBundle interface.
func (*Bundle) Serialize ¶
func (bundle *Bundle) Serialize(commentsFlags encoder.CommentsFlags, machineType machine.Type) ([]byte, error)
Serialize returns the config for the provided machine type as bytes.
func (*Bundle) TalosConfig ¶
func (bundle *Bundle) TalosConfig() *clientconfig.Config
TalosConfig implements the ProviderBundle interface.
type InputOptions ¶
type InputOptions struct { ClusterName string Endpoint string KubeVersion string GenOptions []generate.Option }
InputOptions holds necessary params for generating an input.
type Option ¶
Option controls config options specific to config bundle generation.
func WithExistingConfigs ¶
WithExistingConfigs sets the path to existing config files.
func WithInputOptions ¶
func WithInputOptions(inputOpts *InputOptions) Option
WithInputOptions allows passing in of various params for net-new input generation.
func WithPatch ¶
func WithPatch(patch []configpatcher.Patch) Option
WithPatch allows patching every config in a bundle with a patch.
func WithPatchControlPlane ¶
func WithPatchControlPlane(patch []configpatcher.Patch) Option
WithPatchControlPlane allows patching init and controlplane config in a bundle with a patch.
func WithPatchWorker ¶
func WithPatchWorker(patch []configpatcher.Patch) Option
WithPatchWorker allows patching worker config in a bundle with a patch.
func WithVerbose ¶
WithVerbose allows setting verbose logging.
type Options ¶
type Options struct { ExistingConfigs string // path to existing config files Verbose bool // whether to write any logs during generate InputOptions *InputOptions Patches []configpatcher.Patch PatchesControlPlane []configpatcher.Patch PatchesWorker []configpatcher.Patch }
Options describes generate parameters.