Documentation
¶
Index ¶
- Constants
- type AWSConfig
- type AWSManager
- func (a *AWSManager) AnalyzeNodeStorage(ctx context.Context, clientset kubernetes.Interface, ...) ([]NodeStorageInfo, error)
- func (a *AWSManager) CheckRequiredPermissions(ctx context.Context) error
- func (a *AWSManager) CleanupODFVolumes(ctx context.Context) error
- func (a *AWSManager) ProvisionStorageForNodes(ctx context.Context, nodes []NodeStorageInfo, awsConfig *AWSConfig, ...) error
- type Config
- type Manager
- type NodeStorageInfo
- type PermissionError
- type RequiredAWSPermissions
- type SetupResult
Constants ¶
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 ¶
NewManager creates a new ODF storage manager
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 ¶
RequiredAWSPermissions defines the AWS permissions needed for ODF setup