odf

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Operator names for ODF/OCS
	ODFOperatorName = "odf-operator"
	OCSOperatorName = "ocs-operator" // legacy name
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSConfig

type AWSConfig struct {
	Region           string
	VolumeSize       int32  // Size in GB
	VolumeType       string // gp3, gp2, io1, etc.
	IOPS             int32  // For io1/io2/gp3 volumes
	Throughput       int32  // For gp3 volumes (MB/s)
	Encrypted        bool
	KMSKeyID         string
	AvailabilityZone string
	NodeStorageSize  string // Required storage per node (e.g., "512Gi")
}

AWSConfig holds AWS-specific configuration

type AWSManager

type AWSManager struct {
	// contains filtered or unexported fields
}

AWSManager handles AWS operations for ODF storage provisioning

func NewAWSManager

func NewAWSManager(ctx context.Context, awsConfig *AWSConfig) (*AWSManager, error)

NewAWSManager creates a new AWS manager for ODF operations

func (*AWSManager) AnalyzeNodeStorage

func (a *AWSManager) AnalyzeNodeStorage(ctx context.Context, clientset kubernetes.Interface,
	requiredStoragePerNode int64) ([]NodeStorageInfo, error)

AnalyzeNodeStorage analyzes storage requirements for all worker nodes

func (*AWSManager) CheckRequiredPermissions

func (a *AWSManager) CheckRequiredPermissions(ctx context.Context) error

CheckRequiredPermissions validates that all required AWS permissions are available

func (*AWSManager) CleanupODFVolumes

func (a *AWSManager) CleanupODFVolumes(ctx context.Context) error

CleanupODFVolumes finds and removes EBS volumes created by this tool

func (*AWSManager) ProvisionStorageForNodes

func (a *AWSManager) ProvisionStorageForNodes(ctx context.Context, nodes []NodeStorageInfo,
	awsConfig *AWSConfig, dryRun bool) error

ProvisionStorageForNodes provisions additional EBS volumes for nodes that need them

type Config

type Config struct {
	StorageClassName       string
	ClusterName            string
	Namespace              string
	StorageSize            string
	ReplicaCount           int
	EnableEncryption       bool
	EnableStorageDeviceSet bool
	AggressiveCoherency    bool
	DryRun                 bool
	UpdateMode             bool

	// AWS Integration
	EnableAWSIntegration bool
	AWSRegion            string
	AWSVolumeType        string
	AWSIOPS              int
	AWSThroughput        int
	AWSKMSKeyID          string
}

Config holds ODF-specific configuration

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles ODF operations

func NewManager

func NewManager(ctx context.Context, config *Config) (*Manager, error)

NewManager creates a new ODF storage manager

func (*Manager) Cleanup

func (m *Manager) Cleanup(ctx context.Context) error

Cleanup removes created ODF resources

func (*Manager) SetupODFStorage

func (m *Manager) SetupODFStorage(ctx context.Context) (*SetupResult, error)

SetupODFStorage orchestrates the complete ODF setup process with AWS integration

type NodeStorageInfo

type NodeStorageInfo struct {
	NodeName             string
	InstanceID           string
	AvailabilityZone     string
	ExistingVolumes      []string
	RequiredStorage      int64 // In GB
	HasSufficientStorage bool
}

NodeStorageInfo contains storage information for a node

type PermissionError

type PermissionError struct {
	Type    string // Type of permission error
	Message string // Human-readable error message
	Policy  string // Required IAM policy JSON
}

PermissionError represents an AWS permission error with policy information

func IsPermissionError

func IsPermissionError(err error) (*PermissionError, bool)

IsPermissionError checks if an error is a permission error

func (*PermissionError) Error

func (e *PermissionError) Error() string

type RequiredAWSPermissions

type RequiredAWSPermissions struct {
	EC2Permissions []string
	IAMPermissions []string
}

RequiredAWSPermissions defines the AWS permissions needed for ODF setup

type SetupResult

type SetupResult struct {
	StorageClassName string
	ClusterName      string
	Namespace        string
	TestPassed       bool
}

SetupResult contains the results of ODF storage setup

Jump to

Keyboard shortcuts

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