Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseResourceManager ¶
BaseResourceManager provides common functionality for all resource managers
func NewBaseResourceManager ¶
func NewBaseResourceManager(client client.Client, log logr.Logger, scheme *runtime.Scheme) BaseResourceManager
NewBaseResourceManager creates a new BaseResourceManager
type DeploymentManager ¶
type DeploymentManager struct {
BaseResourceManager
}
DeploymentManager manages Deployment resources
func NewDeploymentManager ¶
func NewDeploymentManager(base BaseResourceManager) *DeploymentManager
NewDeploymentManager creates a new DeploymentManager
func (*DeploymentManager) EnsureResource ¶
func (m *DeploymentManager) EnsureResource(ctx context.Context, nfsProvisioner *cachev1alpha1.NFSProvisioner) error
EnsureResource ensures the Deployment exists
func (*DeploymentManager) GetResourceName ¶
func (m *DeploymentManager) GetResourceName() string
GetResourceName returns the name of the resource this manager handles
type PVCManager ¶
type PVCManager struct {
BaseResourceManager
}
PVCManager manages PersistentVolumeClaim resources
func NewPVCManager ¶
func NewPVCManager(base BaseResourceManager) *PVCManager
NewPVCManager creates a new PVCManager
func (*PVCManager) EnsureResource ¶
func (m *PVCManager) EnsureResource(ctx context.Context, nfsProvisioner *cachev1alpha1.NFSProvisioner) error
EnsureResource ensures the PVC exists when using PVC storage type
func (*PVCManager) GetResourceName ¶
func (m *PVCManager) GetResourceName() string
GetResourceName returns the name of the resource this manager handles
type RBACManager ¶
type RBACManager struct {
BaseResourceManager
}
RBACManager manages all RBAC resources (ClusterRole, ClusterRoleBinding, Role, RoleBinding)
func NewRBACManager ¶
func NewRBACManager(base BaseResourceManager) *RBACManager
NewRBACManager creates a new RBACManager
func (*RBACManager) EnsureResource ¶
func (m *RBACManager) EnsureResource(ctx context.Context, nfsProvisioner *cachev1alpha1.NFSProvisioner) error
EnsureResource ensures all RBAC resources exist
func (*RBACManager) GetResourceName ¶
func (m *RBACManager) GetResourceName() string
GetResourceName returns the name of the resource this manager handles
type ResourceManager ¶
type ResourceManager interface {
// EnsureResource ensures the resource exists and is in the desired state
EnsureResource(ctx context.Context, nfsProvisioner *cachev1alpha1.NFSProvisioner) error
// GetResourceName returns the name of the resource this manager handles
GetResourceName() string
}
ResourceManager defines the interface for managing Kubernetes resources
type ResourceManagerSet ¶
type ResourceManagerSet struct {
// Phase 2 resources
SCC ResourceManager
PVC ResourceManager
ServiceAccount ResourceManager
// Phase 3 resources
RBAC ResourceManager
Deployment ResourceManager
Service ResourceManager
StorageClass ResourceManager
}
ResourceManagerSet holds all resource managers
func NewResourceManagerSet ¶
func NewResourceManagerSet(client client.Client, log logr.Logger, scheme *runtime.Scheme) *ResourceManagerSet
NewResourceManagerSet creates a new set of resource managers
func (*ResourceManagerSet) EnsureAllResources ¶
func (r *ResourceManagerSet) EnsureAllResources(ctx context.Context, nfsProvisioner *cachev1alpha1.NFSProvisioner) error
EnsureAllResources ensures all managed resources exist in the correct state
func (*ResourceManagerSet) GetManagedResourceNames ¶
func (r *ResourceManagerSet) GetManagedResourceNames() []string
GetManagedResourceNames returns the names of all resources managed by this set
type SCCManager ¶
type SCCManager struct {
BaseResourceManager
}
SCCManager manages SecurityContextConstraints resources
func NewSCCManager ¶
func NewSCCManager(base BaseResourceManager) *SCCManager
NewSCCManager creates a new SCCManager
func (*SCCManager) EnsureResource ¶
func (m *SCCManager) EnsureResource(ctx context.Context, nfsProvisioner *cachev1alpha1.NFSProvisioner) error
EnsureResource ensures the SCC exists and is properly configured
func (*SCCManager) GetResourceName ¶
func (m *SCCManager) GetResourceName() string
GetResourceName returns the name of the resource this manager handles
type ServiceAccountManager ¶
type ServiceAccountManager struct {
BaseResourceManager
}
ServiceAccountManager manages ServiceAccount resources
func NewServiceAccountManager ¶
func NewServiceAccountManager(base BaseResourceManager) *ServiceAccountManager
NewServiceAccountManager creates a new ServiceAccountManager
func (*ServiceAccountManager) EnsureResource ¶
func (m *ServiceAccountManager) EnsureResource(ctx context.Context, nfsProvisioner *cachev1alpha1.NFSProvisioner) error
EnsureResource ensures the ServiceAccount exists
func (*ServiceAccountManager) GetResourceName ¶
func (m *ServiceAccountManager) GetResourceName() string
GetResourceName returns the name of the resource this manager handles
type ServiceManager ¶
type ServiceManager struct {
BaseResourceManager
}
ServiceManager manages Service resources
func NewServiceManager ¶
func NewServiceManager(base BaseResourceManager) *ServiceManager
NewServiceManager creates a new ServiceManager
func (*ServiceManager) EnsureResource ¶
func (m *ServiceManager) EnsureResource(ctx context.Context, nfsProvisioner *cachev1alpha1.NFSProvisioner) error
EnsureResource ensures the Service exists
func (*ServiceManager) GetResourceName ¶
func (m *ServiceManager) GetResourceName() string
GetResourceName returns the name of the resource this manager handles
type StorageClassManager ¶
type StorageClassManager struct {
BaseResourceManager
}
StorageClassManager manages StorageClass resources
func NewStorageClassManager ¶
func NewStorageClassManager(base BaseResourceManager) *StorageClassManager
NewStorageClassManager creates a new StorageClassManager
func (*StorageClassManager) EnsureResource ¶
func (m *StorageClassManager) EnsureResource(ctx context.Context, nfsProvisioner *cachev1alpha1.NFSProvisioner) error
EnsureResource ensures the StorageClass exists
func (*StorageClassManager) GetResourceName ¶
func (m *StorageClassManager) GetResourceName() string
GetResourceName returns the name of the resource this manager handles