Documentation
¶
Index ¶
- Constants
- type Manager
- func (m *Manager) AnnotateService(ctx context.Context) error
- func (m *Manager) ComputeValuesFile(profile string, valuesFile string) (string, error)
- func (m *Manager) CreateNamespace(ctx context.Context, tempDir string) error
- func (m *Manager) CreatePersistentVolumes(ctx context.Context, tempDir string) error
- func (m *Manager) DeleteNamespace(ctx context.Context, tempDir string) error
- func (m *Manager) DeletePersistentVolumes(ctx context.Context, tempDir string) error
- func (m *Manager) GetStoragePaths() (archivePath, livePath, logPath string, err error)
- func (m *Manager) InstallChart(ctx context.Context, valuesFile string) (bool, error)
- func (m *Manager) SetupStorage(ctx context.Context) error
- func (m *Manager) UninstallChart(ctx context.Context) error
- func (m *Manager) UpgradeChart(ctx context.Context, valuesFile string, reuseValues bool) error
- func (m *Manager) WaitForPodReady(ctx context.Context) error
Constants ¶
const ( // Kubernetes resources ServiceNameSuffix = "-block-node-server" PodLabelSelector = "app.kubernetes.io/name=block-node-server" MetalLBAnnotation = "metallb.io/address-pool=public-address-pool" // Template paths NamespacePath = "files/block-node/namespace.yaml" StorageConfigPath = "files/block-node/storage-config.yaml" ValuesPath = "files/block-node/full-values.yaml" NanoValuesPath = "files/block-node/nano-values.yaml" // Timeouts PodReadyTimeoutSeconds = 300 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles block node setup and management operations
func NewManager ¶
func NewManager(blockConfig config.BlockNodeConfig) (*Manager, error)
NewManager creates a new block node manager
func (*Manager) AnnotateService ¶
AnnotateService annotates the block node service with MetalLB address pool
func (*Manager) ComputeValuesFile ¶
ComputeValuesFile generates the values file for helm installation based on profile. It provides the path to the generated values file.
NOTE: This method implements defense-in-depth validation. Even though the CLI layer validates paths using sanity.ValidateInputFile(), this method also validates to ensure safety regardless of the caller. This protects against future code changes where this method might be called from other places without proper validation.
func (*Manager) CreateNamespace ¶
CreateNamespace creates the block-node namespace if it doesn't exist
func (*Manager) CreatePersistentVolumes ¶
CreatePersistentVolumes creates PVs and PVCs from the storage config
func (*Manager) DeleteNamespace ¶
DeleteNamespace deletes the block-node namespace
func (*Manager) DeletePersistentVolumes ¶
DeletePersistentVolumes deletes PVs and PVCs
func (*Manager) GetStoragePaths ¶ added in v0.6.0
GetStoragePaths returns the computed storage paths based on configuration. If individual paths are specified, they are used; otherwise, paths are derived from basePath. All paths are validated using sanity checks.
func (*Manager) InstallChart ¶
InstallChart installs the block node helm chart
func (*Manager) SetupStorage ¶
SetupStorage creates the required directories for block node storage
func (*Manager) UninstallChart ¶
UninstallChart uninstalls the block node helm chart
func (*Manager) UpgradeChart ¶ added in v0.5.0
UpgradeChart upgrades the block node helm chart