bashible

package
v1.72.10 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KubernetesConfig

func KubernetesConfig(name string) []go_hook.KubernetesConfig

Types

type Config

type Config bashible.Config

type ConfigBuilder

type ConfigBuilder struct {
	ModeParams     ModeParams
	ActualParams   []ModeParams
	MasterNodesIPs []string
}

type DirectModeParams

type DirectModeParams struct {
	ImagesRepo string `json:"imagesRepo" yaml:"imagesRepo"`
	Scheme     string `json:"scheme" yaml:"scheme"`
	CA         string `json:"ca,omitempty" yaml:"ca,omitempty"`
	Username   string `json:"username" yaml:"username"`
	Password   string `json:"password" yaml:"password"`
}

type Inputs

type Inputs struct {
	IsSecretExist  bool
	MasterNodesIPs []string
	NodeStatus     map[string]InputsNodeStatus
}

func InputsFromSnapshot

func InputsFromSnapshot(input *go_hook.HookInput, name string) (Inputs, error)

type InputsNodeStatus

type InputsNodeStatus struct {
	Version           string
	ContainerdCfgMode string
}

type ModeParams

type ModeParams struct {
	Direct    *DirectModeParams    `json:"direct,omitempty" yaml:"direct,omitempty"`
	Unmanaged *UnmanagedModeParams `json:"unmanaged,omitempty" yaml:"unmanaged,omitempty"`
}

type Params

type Params struct {
	ModeParams     ModeParams
	RegistrySecret deckhouse_registry.Config
}

type Result

type Result struct {
	Ready   bool
	Message string
}

func PreflightCheck

func PreflightCheck(input Inputs) Result

type State

type State struct {
	UnmanagedParams *UnmanagedModeParams `json:"unmanaged_params,omitempty" yaml:"unmanaged_params,omitempty"`
	ActualParams    *ModeParams          `json:"actual_params,omitempty" yaml:"actual_params,omitempty"`
	Config          *Config              `json:"config,omitempty" yaml:"config,omitempty"`
}

func (*State) FinalizeTransition

func (s *State) FinalizeTransition(params Params, inputs Inputs) (Result, error)

FinalizeTransition replaces the existing config with the new one. Should be called after successful Transition Stage.

func (*State) FinalizeUnmanagedTransition

func (s *State) FinalizeUnmanagedTransition(registrySecret deckhouse_registry.Config, inputs Inputs) (Result, error)

FinalizeUnmanagedTransition handles the transition away from managed configuration mode. If the registry secret is not present, the internal state is cleared and the transition is considered complete. If the secret is present – we preserve and support its configuration instead of using Deckhouse registry secret.

func (*State) ProcessTransition

func (s *State) ProcessTransition(params Params, inputs Inputs) (Result, error)

ProcessTransition applies the new configuration alongside the existing one. Should be used when registry mode or its parameters change (transition phase).

type UnmanagedModeParams

type UnmanagedModeParams struct {
	ImagesRepo string `json:"imagesRepo" yaml:"imagesRepo"`
	Scheme     string `json:"scheme" yaml:"scheme"`
	CA         string `json:"ca,omitempty" yaml:"ca,omitempty"`
	Username   string `json:"username" yaml:"username"`
	Password   string `json:"password" yaml:"password"`
}

Jump to

Keyboard shortcuts

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