Documentation
¶
Overview ¶
Package controller implements the controller logic
Index ¶
- Constants
- Variables
- func BareMetalInstanceNamespacePredicate(namespace string) predicate.Predicate
- func ComputeInstanceNamespacePredicate(namespace string) predicate.Predicate
- func NamespacePredicate(namespace string) predicate.Predicate
- func NetworkingNamespacePredicate(namespace string) predicate.Predicate
- func NewStorageCatalogSyncRunnable(reconciler *StorageReconciler, interval time.Duration) manager.Runnable
- func RegisterAutoExternalIPAttachmentOwnerIndex(indexer client.FieldIndexer) error
- func VolumeNamespacePredicate(namespace string) predicate.Predicate
- type AddOnOperatorReconciler
- type BareMetalInstanceCleanupReconciler
- type BareMetalInstanceFeedbackReconciler
- type ClusterOrderReconciler
- type ClusterOrderStallThresholds
- type ClusterUpgradeTimeouts
- type ComputeInstanceFeedbackReconciler
- type ComputeInstanceReconciler
- type ExternalIPAttachmentFeedbackReconciler
- type ExternalIPAttachmentReconciler
- type ExternalIPFeedbackReconciler
- type ExternalIPPoolFeedbackReconciler
- type ExternalIPPoolReconciler
- type ExternalIPReconciler
- type FabricDomainFeedbackReconciler
- type FabricDomainReconciler
- type FeedbackReconciler
- type FeedbackReconcilerConfig
- type FulfillmentTrustReconciler
- type FulfillmentTrustTarget
- type FulfillmentTrustTargetResolver
- type HostedClusterKubeconfigReader
- type HostedClusterKubeconfigResolver
- type HostedClusterTrustTargetResolver
- type KubernetesTrustTarget
- func (t *KubernetesTrustTarget) Apply(ctx context.Context, expected trustadmission.ExpectedBundle) error
- func (t *KubernetesTrustTarget) Observe(ctx context.Context, expected trustadmission.ExpectedBundle) (bool, bool, error)
- func (t *KubernetesTrustTarget) Publish(ctx context.Context, record trustadmission.ExpectedBundle) error
- func (t *KubernetesTrustTarget) Revoke(ctx context.Context, key trustadmission.RecordKey) error
- type KubernetesTrustTokenIssuer
- type LvmsVendorProvisioner
- type NATGatewayFeedbackReconciler
- type NATGatewayReconciler
- type NetworkAttachmentReconciler
- type NetworkClassFeedbackReconciler
- type NetworkClassReconciler
- type NewComponentFn
- type ProviderNotImplementedError
- type SecretsClient
- type SecurityGroupFeedbackReconciler
- type SecurityGroupReconciler
- type StorageBackendsClient
- type StorageReconciler
- type StorageTiersLister
- type SubnetFeedbackReconciler
- type SubnetReconciler
- type TenantFeedbackReconciler
- type TenantReconciler
- type TrustServiceAccountToken
- type TrustTokenIssuer
- type VastVendorProvisioner
- type VendorCreateVolumeRequest
- type VendorCreateVolumeResponse
- type VendorDeleteVolumeRequest
- type VendorProvisioner
- type VendorProvisionerRegistry
- type VirtualNetworkFeedbackReconciler
- type VirtualNetworkReconciler
- type VolumeFeedbackReconciler
- type VolumeReconciler
Constants ¶
const ( // ManagementStateManual indicates that the resource should not be managed by the controller ManagementStateManual = "manual" // ManagementStateUnmanaged indicates that the resource should be ignored by the controller ManagementStateUnmanaged = "unmanaged" )
const (
ClusterOrderControllerName = "clusterorder-controller"
)
const (
DefaultBareMetalInstanceNamespace string = "osac-baremetalinstance"
)
const (
// DefaultFulfillmentTrustSourceName is the management CA ConfigMap name used when none is configured.
DefaultFulfillmentTrustSourceName = "ca-bundle"
)
Variables ¶
var ErrExternalIPAttachmentNotFound = errors.New("external IP attachment not found in fulfillment service")
var ErrExternalIPNotFound = errors.New("external IP not found in fulfillment service")
var ErrProviderNotImplemented = errors.New("provider not implemented")
ErrProviderNotImplemented identifies a provider that has no registered VendorProvisioner implementation.
var ErrTenantBeingDeleted = errors.New("tenant is being deleted")
ErrTenantBeingDeleted is returned by getTenant when the tenant exists but has DeletionTimestamp set.
Functions ¶
func BareMetalInstanceNamespacePredicate ¶
BareMetalInstanceNamespacePredicate filters events to a specific namespace.
func NamespacePredicate ¶
func NetworkingNamespacePredicate ¶
NetworkingNamespacePredicate selects objects in the hub networking namespace.
func NewStorageCatalogSyncRunnable ¶ added in v0.0.34
func NewStorageCatalogSyncRunnable(reconciler *StorageReconciler, interval time.Duration) manager.Runnable
NewStorageCatalogSyncRunnable returns a manager.Runnable that periodically polls the fulfillment service for StorageTier and StorageBackend catalog changes once for the entire operator and enqueues Tenants only when the catalog snapshot changes.
func RegisterAutoExternalIPAttachmentOwnerIndex ¶ added in v0.0.33
func RegisterAutoExternalIPAttachmentOwnerIndex(indexer client.FieldIndexer) error
RegisterAutoExternalIPAttachmentOwnerIndex indexes attachments by their target owner. Call before the manager cache starts; cleanup reconciliations use this index to avoid listing every automatically managed attachment in the networking namespace.
func VolumeNamespacePredicate ¶
VolumeNamespacePredicate filters events to only those in the configured volume namespace, preventing the controller from reacting to Volume CRs in other namespaces.
Types ¶
type AddOnOperatorReconciler ¶ added in v0.0.25
type AddOnOperatorReconciler struct {
client.Client
ClusterOrderNamespace string
ProvisioningProvider provisioning.ProvisioningProvider
StatusPollInterval time.Duration
MaxJobHistory int
Recorder events.EventRecorder
// contains filtered or unexported fields
}
AddOnOperatorReconciler reconciles per-operator installation jobs for ready ClusterOrders without owning the main ClusterOrder provisioning lifecycle. +kubebuilder:rbac:groups=osac.openshift.io,resources=clusterorders,verbs=get;list;watch;patch +kubebuilder:rbac:groups=osac.openshift.io,resources=clusterorders/status,verbs=get;update;patch +kubebuilder:rbac:groups=osac.openshift.io,resources=clusterorders/finalizers,verbs=update +kubebuilder:rbac:groups=hypershift.openshift.io,resources=hostedcontrolplanes,verbs=get;list;watch +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch
func NewAddOnOperatorReconciler ¶ added in v0.0.25
func NewAddOnOperatorReconciler( k8sClient client.Client, apiReader client.Reader, namespace string, provider provisioning.ProvisioningProvider, pollInterval time.Duration, ) *AddOnOperatorReconciler
NewAddOnOperatorReconciler creates a reconciler for add-on operator jobs.
func (*AddOnOperatorReconciler) Reconcile ¶ added in v0.0.25
func (r *AddOnOperatorReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile processes independently tracked operator installation jobs after the main ClusterOrder reaches Ready.
func (*AddOnOperatorReconciler) SetupWithManager ¶ added in v0.0.25
func (r *AddOnOperatorReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the namespaced ClusterOrder controller.
type BareMetalInstanceCleanupReconciler ¶ added in v0.0.33
type BareMetalInstanceCleanupReconciler struct {
client.Client
BareMetalInstancesClient automaticBareMetalInstancesGetter
ExternalIPAttachmentsClient automaticExternalIPAttachmentsClient
// contains filtered or unexported fields
}
BareMetalInstanceCleanupReconciler removes automatically created networking resources before a BareMetalInstance is deleted.
func NewBareMetalInstanceCleanupReconciler ¶ added in v0.0.33
func NewBareMetalInstanceCleanupReconciler(c client.Client, bareMetalInstanceNamespace, networkingNamespace string) *BareMetalInstanceCleanupReconciler
NewBareMetalInstanceCleanupReconciler creates the networking cleanup controller.
func (*BareMetalInstanceCleanupReconciler) Reconcile ¶ added in v0.0.33
func (r *BareMetalInstanceCleanupReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile guards BareMetalInstance deletion until its automatically created networking resources are gone.
func (*BareMetalInstanceCleanupReconciler) SetupWithManager ¶ added in v0.0.33
func (r *BareMetalInstanceCleanupReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the BareMetalInstance lifecycle watch.
type BareMetalInstanceFeedbackReconciler ¶
type BareMetalInstanceFeedbackReconciler struct {
// contains filtered or unexported fields
}
BareMetalInstanceFeedbackReconciler watches BareMetalInstance CRs and signals the fulfillment-service when their status changes.
func NewBareMetalInstanceFeedbackReconciler ¶
func NewBareMetalInstanceFeedbackReconciler(hubClient clnt.Client, grpcConn grpc.ClientConnInterface, bareMetalInstanceNamespace string) *BareMetalInstanceFeedbackReconciler
NewBareMetalInstanceFeedbackReconciler creates a reconciler that signals the fulfillment-service when BareMetalInstance CRs change.
func (*BareMetalInstanceFeedbackReconciler) Reconcile ¶
func (r *BareMetalInstanceFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (result ctrl.Result, err error)
Reconcile watches BareMetalInstance CRs and calls Signal RPC on changes.
func (*BareMetalInstanceFeedbackReconciler) SetupWithManager ¶
func (r *BareMetalInstanceFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager adds the reconciler to the controller manager.
type ClusterOrderReconciler ¶
type ClusterOrderReconciler struct {
client.Client
Scheme *runtime.Scheme
ClusterOrderNamespace string
AgentNamespace string
NetworkingNamespace string
ClustersClient automaticClustersGetter
ExternalIPAttachmentsClient automaticExternalIPAttachmentsClient
ProvisioningProvider provisioning.ProvisioningProvider
StatusPollInterval time.Duration
MaxJobHistory int
StallThresholds ClusterOrderStallThresholds
Recorder events.EventRecorder
// contains filtered or unexported fields
}
ClusterOrderReconciler reconciles a ClusterOrder object
func NewClusterOrderReconciler ¶
func NewClusterOrderReconciler( client client.Client, apiReader client.Reader, scheme *runtime.Scheme, clusterOrderNamespace string, networkingNamespace string, provisioningProvider provisioning.ProvisioningProvider, statusPollInterval time.Duration, maxJobHistory int, ) *ClusterOrderReconciler
func (*ClusterOrderReconciler) Reconcile ¶
func (r *ClusterOrderReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*ClusterOrderReconciler) SetupWithManager ¶
func (r *ClusterOrderReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager sets up the controller with the Manager.
type ClusterOrderStallThresholds ¶
type ClusterOrderStallThresholds struct {
PreparingInfrastructure time.Duration
ControlPlaneStarting time.Duration
WorkersJoining time.Duration
WorkersJoiningByInstanceType map[string]time.Duration
}
ClusterOrderStallThresholds configures the maximum time a ClusterOrder may spend in each provisioning stage before it is reported as stalled.
func DefaultClusterOrderStallThresholds ¶
func DefaultClusterOrderStallThresholds() ClusterOrderStallThresholds
DefaultClusterOrderStallThresholds returns the production-safe stall thresholds.
type ClusterUpgradeTimeouts ¶ added in v0.0.40
type ClusterUpgradeTimeouts struct {
Pending time.Duration
ControlPlane time.Duration
NodePoolPerNode time.Duration
}
ClusterUpgradeTimeouts controls upgrade observation deadlines.
func DefaultClusterUpgradeTimeouts ¶ added in v0.0.40
func DefaultClusterUpgradeTimeouts() ClusterUpgradeTimeouts
DefaultClusterUpgradeTimeouts returns the deployment defaults for upgrade observation deadlines.
type ComputeInstanceFeedbackReconciler ¶
type ComputeInstanceFeedbackReconciler struct {
// contains filtered or unexported fields
}
ComputeInstanceFeedbackReconciler sends updates to the fulfillment service.
func NewComputeInstanceFeedbackReconciler ¶
func NewComputeInstanceFeedbackReconciler(hubClient clnt.Client, grpcConn grpc.ClientConnInterface, computeInstanceNamespace string) *ComputeInstanceFeedbackReconciler
NewComputeInstanceFeedbackReconciler creates a reconciler that sends to the fulfillment service updates about compute instances.
func (*ComputeInstanceFeedbackReconciler) Reconcile ¶
func (r *ComputeInstanceFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile delegates to the shared feedback Bridge.
func (*ComputeInstanceFeedbackReconciler) SetupWithManager ¶
func (r *ComputeInstanceFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager adds the reconciler to the controller manager.
type ComputeInstanceReconciler ¶
type ComputeInstanceReconciler struct {
client.Client
// APIReader reads from the API server where a stale cache must not be used.
APIReader client.Reader
Scheme *runtime.Scheme
Recorder events.EventRecorder
ComputeInstanceNamespace string
TenantNamespace string
NetworkingNamespace string
// Engine launches and tracks the provision and deprovision jobs. Its
// ProvisioningEnabled is global.networking.provisioningEnabled.
Engine *networktask.Engine
// ProvisionTemplate and DeprovisionTemplate are the ocp_virt_vm job templates.
ProvisionTemplate string
DeprovisionTemplate string
// StatusPollInterval is how often waiting steps are checked again.
StatusPollInterval time.Duration
// TiersClient and BackendsClient query the fulfillment service Tier API for
// JIT storage provisioning extra_vars. When nil, tier/backend context
// injection is skipped — backward compatible with environments without a
// fulfillment service connection. See resolveAndPartitionTierContext.
TiersClient StorageTiersLister
BackendsClient StorageBackendsClient
// SecretsClient resolves a storage backend's password from a referenced Secret
// when the backend supplies password_secret instead of an inline password. When
// nil, backends that rely on password_secret are skipped. See resolveAndPartitionTierContext.
SecretsClient SecretsClient
// contains filtered or unexported fields
}
ComputeInstanceReconciler reconciles a ComputeInstance object (VMaaS networking design): it creates the VM's NetworkAttachment, runs the ocp_virt_vm provision and deprovision jobs through the network task engine (status.jobs, manager none), discovers the VM address and reports NetworkReady.
func NewComputeInstanceReconciler ¶
func NewComputeInstanceReconciler( mgr mcmanager.Manager, computeInstanceNamespace string, tenantNamespace string, networkingNamespace string, engine *networktask.Engine, provisionTemplate string, deprovisionTemplate string, statusPollInterval time.Duration, targetCluster mc.ClusterName, ) *ComputeInstanceReconciler
func (*ComputeInstanceReconciler) Reconcile ¶
func (r *ComputeInstanceReconciler) Reconcile(ctx context.Context, req mcreconcile.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*ComputeInstanceReconciler) SetupWithManager ¶
func (r *ComputeInstanceReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager sets up the controller with the Manager.
type ExternalIPAttachmentFeedbackReconciler ¶
type ExternalIPAttachmentFeedbackReconciler struct {
// contains filtered or unexported fields
}
func NewExternalIPAttachmentFeedbackReconciler ¶
func NewExternalIPAttachmentFeedbackReconciler(hubClient clnt.Client, grpcConn grpc.ClientConnInterface, networkingNamespace string) *ExternalIPAttachmentFeedbackReconciler
func (*ExternalIPAttachmentFeedbackReconciler) Reconcile ¶
func (r *ExternalIPAttachmentFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile delegates to the shared feedback Bridge.
func (*ExternalIPAttachmentFeedbackReconciler) SetupWithManager ¶
func (r *ExternalIPAttachmentFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error
type ExternalIPAttachmentReconciler ¶
type ExternalIPAttachmentReconciler struct {
Client client.Client
Engine *networktask.Engine
NetworkingNamespace string
}
ExternalIPAttachmentReconciler runs the Fabric attach_external_ip and detach_external_ip tasks (contract §4.10). It builds the destination from the target workload (VMaaS, BMaaS and CaaS designs, ExternalIPAttachment target), stores it in the task input and records it in status.destination. It adds no finalizer to the target and never deletes itself.
func (*ExternalIPAttachmentReconciler) Reconcile ¶
func (r *ExternalIPAttachmentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile advances the attach or detach of an ExternalIPAttachment.
func (*ExternalIPAttachmentReconciler) SetupWithManager ¶
func (r *ExternalIPAttachmentReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the controller. ExternalIP events and target workload events re-queue the ExternalIPAttachments that use them.
type ExternalIPFeedbackReconciler ¶
type ExternalIPFeedbackReconciler struct {
// contains filtered or unexported fields
}
ExternalIPFeedbackReconciler sends updates to the fulfillment service.
func NewExternalIPFeedbackReconciler ¶
func NewExternalIPFeedbackReconciler(hubClient clnt.Client, grpcConn grpc.ClientConnInterface, networkingNamespace string) *ExternalIPFeedbackReconciler
NewExternalIPFeedbackReconciler creates a reconciler that sends to the fulfillment service updates about external IPs.
func (*ExternalIPFeedbackReconciler) Reconcile ¶
func (r *ExternalIPFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile delegates to the shared feedback Bridge.
func (*ExternalIPFeedbackReconciler) SetupWithManager ¶
func (r *ExternalIPFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager adds the reconciler to the controller manager.
type ExternalIPPoolFeedbackReconciler ¶
type ExternalIPPoolFeedbackReconciler struct {
// contains filtered or unexported fields
}
ExternalIPPoolFeedbackReconciler sends updates to the fulfillment service.
func NewExternalIPPoolFeedbackReconciler ¶
func NewExternalIPPoolFeedbackReconciler(hubClient clnt.Client, grpcConn grpc.ClientConnInterface, networkingNamespace string) *ExternalIPPoolFeedbackReconciler
NewExternalIPPoolFeedbackReconciler creates a reconciler that sends to the fulfillment service updates about external IP pools.
func (*ExternalIPPoolFeedbackReconciler) Reconcile ¶
func (r *ExternalIPPoolFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile delegates to the shared feedback Bridge.
func (*ExternalIPPoolFeedbackReconciler) SetupWithManager ¶
func (r *ExternalIPPoolFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager adds the reconciler to the controller manager.
type ExternalIPPoolReconciler ¶
type ExternalIPPoolReconciler struct {
Client client.Client
Engine *networktask.Engine
NetworkingNamespace string
}
ExternalIPPoolReconciler runs the Fabric create_external_ip_pool and delete_external_ip_pool tasks (contract §4.10). A pool records only the Fabric Manager of the NetworkClass.
func (*ExternalIPPoolReconciler) Reconcile ¶
func (r *ExternalIPPoolReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile advances the create or delete of an ExternalIPPool.
func (*ExternalIPPoolReconciler) SetupWithManager ¶
func (r *ExternalIPPoolReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the controller. NetworkClass events re-queue waiting pools; ExternalIP events re-queue their pool.
type ExternalIPReconciler ¶
type ExternalIPReconciler struct {
Client client.Client
Engine *networktask.Engine
NetworkingNamespace string
}
ExternalIPReconciler runs the Fabric create_external_ip and delete_external_ip tasks (contract §4.10). It writes status.address only from an accepted result; the API state is ALLOCATED exactly when the address is set and the ExternalIP is not being deleted.
func (*ExternalIPReconciler) Reconcile ¶
func (r *ExternalIPReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile advances the create or delete of an ExternalIP.
func (*ExternalIPReconciler) SetupWithManager ¶
func (r *ExternalIPReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the controller. Pool events re-queue its ExternalIPs; ExternalIPAttachment and NATGateway events re-queue their ExternalIP.
type FabricDomainFeedbackReconciler ¶ added in v0.0.29
type FabricDomainFeedbackReconciler struct {
// contains filtered or unexported fields
}
FabricDomainFeedbackReconciler synchronizes FabricDomain status with fulfillment-service.
func NewFabricDomainFeedbackReconciler ¶ added in v0.0.29
func NewFabricDomainFeedbackReconciler( hubClient clnt.Client, grpcConn grpc.ClientConnInterface, networkingNamespace string, ) *FabricDomainFeedbackReconciler
NewFabricDomainFeedbackReconciler creates the fulfillment-service feedback reconciler.
func (*FabricDomainFeedbackReconciler) Reconcile ¶ added in v0.0.29
func (r *FabricDomainFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile delegates to the shared feedback bridge.
func (*FabricDomainFeedbackReconciler) SetupWithManager ¶ added in v0.0.29
func (r *FabricDomainFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the feedback controller.
type FabricDomainReconciler ¶ added in v0.0.29
type FabricDomainReconciler struct {
Client client.Client
Engine *networktask.Engine
NetworkingNamespace string
// Recorder emits the FabricDomain Events; nil disables them.
Recorder events.EventRecorder
// contains filtered or unexported fields
}
FabricDomainReconciler runs the Fabric create_fabric_domain and delete_fabric_domain tasks (contract §4.10). It launches only when the NetworkClass enables Ethernet east-west; NetworkClass resolution already requires the Fabric Manager to declare eastWestEthernet then (contract §4.2).
func (*FabricDomainReconciler) Reconcile ¶ added in v0.0.29
func (r *FabricDomainReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile advances the create or delete of a FabricDomain.
func (*FabricDomainReconciler) SetupWithManager ¶ added in v0.0.29
func (r *FabricDomainReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the controller. VirtualNetwork events re-queue its FabricDomains.
type FeedbackReconciler ¶
type FeedbackReconciler struct {
// contains filtered or unexported fields
}
FeedbackReconciler sends updates to the fulfillment service.
func NewFeedbackReconciler ¶
func NewFeedbackReconciler(hubClient clnt.Client, grpcConn grpc.ClientConnInterface, config FeedbackReconcilerConfig) *FeedbackReconciler
NewFeedbackReconciler creates a reconciler that sends to the fulfillment service updates about cluster orders.
func (*FeedbackReconciler) Reconcile ¶
func (r *FeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile delegates to the shared feedback Bridge.
func (*FeedbackReconciler) SetupWithManager ¶
func (r *FeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager adds the reconciler to the controller manager.
type FeedbackReconcilerConfig ¶ added in v0.0.40
type FeedbackReconcilerConfig struct {
ClusterOrderNamespace string
UpgradeTimeouts ClusterUpgradeTimeouts
}
FeedbackReconcilerConfig holds configuration for ClusterOrder feedback.
type FulfillmentTrustReconciler ¶ added in v0.0.19
type FulfillmentTrustReconciler struct {
client.Client
APIReader client.Reader
Enabled bool
ClusterOrderNamespace string
SourceNamespace string
TenantNamespace string
SourceName string
Targets FulfillmentTrustTargetResolver
PollInterval time.Duration
Now func() time.Time
}
FulfillmentTrustReconciler synchronizes the management CA to tenant-scoped ClusterOrders. It uses short-lived target service-account tokens and never stores a tenant kubeconfig or token in the management cluster.
func (*FulfillmentTrustReconciler) SetupWithManager ¶ added in v0.0.19
func (r *FulfillmentTrustReconciler) SetupWithManager(mgr mcmanager.Manager) error
type FulfillmentTrustTarget ¶ added in v0.0.19
type FulfillmentTrustTarget interface {
Observe(context.Context, trustadmission.ExpectedBundle) (bool, bool, error)
Publish(context.Context, trustadmission.ExpectedBundle) error
Apply(context.Context, trustadmission.ExpectedBundle) error
Revoke(context.Context, trustadmission.RecordKey) error
}
type FulfillmentTrustTargetResolver ¶ added in v0.0.19
type FulfillmentTrustTargetResolver interface {
Resolve(context.Context, *v1alpha1.ClusterOrder) (FulfillmentTrustTarget, error)
}
type HostedClusterKubeconfigReader ¶ added in v0.0.19
type HostedClusterKubeconfigResolver ¶ added in v0.0.19
HostedClusterKubeconfigResolver follows the ClusterOrder's control-plane reference to the HyperShift kubeconfig Secret for the trust reconciler. Kubeconfig bytes stay in this process and are never copied to a Secret, status field, log, or AAP job by the trust path.
func (*HostedClusterKubeconfigResolver) Read ¶ added in v0.0.19
func (r *HostedClusterKubeconfigResolver) Read(ctx context.Context, order *v1alpha1.ClusterOrder) ([]byte, error)
type HostedClusterTrustTargetResolver ¶ added in v0.0.19
type HostedClusterTrustTargetResolver struct {
Kubeconfigs HostedClusterKubeconfigReader
Issuer TrustTokenIssuer
Namespace string
Now func() time.Time
// contains filtered or unexported fields
}
HostedClusterTrustTargetResolver retains scoped tokens only in process memory and renews them before expiry. No kubeconfig or bearer token is persisted.
func (*HostedClusterTrustTargetResolver) ForgetByOrder ¶ added in v0.0.19
func (r *HostedClusterTrustTargetResolver) ForgetByOrder(key client.ObjectKey)
func (*HostedClusterTrustTargetResolver) Resolve ¶ added in v0.0.19
func (r *HostedClusterTrustTargetResolver) Resolve(ctx context.Context, order *v1alpha1.ClusterOrder) (FulfillmentTrustTarget, error)
type KubernetesTrustTarget ¶ added in v0.0.19
type KubernetesTrustTarget struct {
Observer client.Reader
Writer client.Client
Publisher interface {
Publish(context.Context, trustadmission.ExpectedBundle) error
Revoke(context.Context, trustadmission.RecordKey) error
}
Namespace string
}
KubernetesTrustTarget reads tenant state with the observer identity and performs only admission-validated trust mutations with the scoped sync token.
func (*KubernetesTrustTarget) Apply ¶ added in v0.0.19
func (t *KubernetesTrustTarget) Apply(ctx context.Context, expected trustadmission.ExpectedBundle) error
Apply idempotently writes the expected bundle and changes only the CSI Deployment pod-template hash, which the tenant admission webhook enforces.
func (*KubernetesTrustTarget) Observe ¶ added in v0.0.19
func (t *KubernetesTrustTarget) Observe(ctx context.Context, expected trustadmission.ExpectedBundle) (bool, bool, error)
Observe verifies exact bundle metadata and the ready rollout for all CSI controller Deployments. Missing or legacy controllers are never reported ready.
func (*KubernetesTrustTarget) Publish ¶ added in v0.0.19
func (t *KubernetesTrustTarget) Publish(ctx context.Context, record trustadmission.ExpectedBundle) error
func (*KubernetesTrustTarget) Revoke ¶ added in v0.0.19
func (t *KubernetesTrustTarget) Revoke(ctx context.Context, key trustadmission.RecordKey) error
type KubernetesTrustTokenIssuer ¶ added in v0.0.19
KubernetesTrustTokenIssuer validates the chart-installed service-account ownership and requests bounded TokenRequest credentials from the tenant API.
func (*KubernetesTrustTokenIssuer) Issue ¶ added in v0.0.19
func (i *KubernetesTrustTokenIssuer) Issue(ctx context.Context, kubeconfig []byte, namespace, serviceAccount, tenant, owner string) (TrustServiceAccountToken, error)
type LvmsVendorProvisioner ¶ added in v0.0.19
type LvmsVendorProvisioner struct {
// contains filtered or unexported fields
}
LvmsVendorProvisioner provisions node-local volumes through TopoLVM's cluster-scoped LogicalVolume API.
func NewLvmsVendorProvisioner ¶ added in v0.0.19
func NewLvmsVendorProvisioner(writer logicalVolumeWriter, uncachedReader logicalVolumeReader) *LvmsVendorProvisioner
NewLvmsVendorProvisioner creates an LVMS provisioner backed by a Kubernetes writer and an uncached reader for topolvm.io/v1 LogicalVolume resources. The uncached reader avoids a second, unsynchronized cache alongside the metadata-only LogicalVolume watch.
func (*LvmsVendorProvisioner) CreateVolume ¶ added in v0.0.19
func (p *LvmsVendorProvisioner) CreateVolume(ctx context.Context, req VendorCreateVolumeRequest) (VendorCreateVolumeResponse, error)
CreateVolume creates a LogicalVolume and checks whether TopoLVM has assigned its volumeID. If the CR is still pending, the LogicalVolume name is returned in VendorContext so the next reconcile can resume the operation without creating a duplicate resource or blocking a reconcile worker.
func (*LvmsVendorProvisioner) DeleteVolume ¶ added in v0.0.19
func (p *LvmsVendorProvisioner) DeleteVolume(ctx context.Context, req VendorDeleteVolumeRequest) error
DeleteVolume deletes the generated LogicalVolume name recorded during creation. A missing object is already deleted and is therefore successful.
type NATGatewayFeedbackReconciler ¶
type NATGatewayFeedbackReconciler struct {
// contains filtered or unexported fields
}
NATGatewayFeedbackReconciler sends updates to the fulfillment service.
func NewNATGatewayFeedbackReconciler ¶
func NewNATGatewayFeedbackReconciler(hubClient clnt.Client, grpcConn grpc.ClientConnInterface, networkingNamespace string) *NATGatewayFeedbackReconciler
NewNATGatewayFeedbackReconciler creates a reconciler that sends to the fulfillment service updates about NAT gateways.
func (*NATGatewayFeedbackReconciler) Reconcile ¶
func (r *NATGatewayFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile delegates to the shared feedback Bridge.
func (*NATGatewayFeedbackReconciler) SetupWithManager ¶
func (r *NATGatewayFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager adds the reconciler to the controller manager.
type NATGatewayReconciler ¶
type NATGatewayReconciler struct {
Client client.Client
Engine *networktask.Engine
NetworkingNamespace string
}
NATGatewayReconciler runs the Fabric create_nat_gateway and delete_nat_gateway tasks (contract §4.10) once the VirtualNetwork is Ready and the ExternalIP is ALLOCATED. A NATGateway records only the Fabric Manager. See natgateway_contract.go for the dependency snapshot and result checks.
func (*NATGatewayReconciler) Reconcile ¶
func (r *NATGatewayReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile advances the create or delete of a NATGateway.
func (*NATGatewayReconciler) SetupWithManager ¶
func (r *NATGatewayReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the controller. VirtualNetwork and ExternalIP events re-queue the NATGateways that use them.
type NetworkAttachmentReconciler ¶ added in v0.0.40
type NetworkAttachmentReconciler struct {
Client client.Client
Engine *networktask.Engine
NetworkingNamespace string
}
NetworkAttachmentReconciler runs the attachment tasks of one workload interface (Unified design, NetworkAttachment; contract §4.10):
- overlay (VM): Kubernetes apply_network_attachment (accepting vm_attachment), then, once VMaaS reported the VM address, the Fabric apply with network_attachment.interface.ipv4_address; delete Fabric, then Kubernetes;
- physical (bare metal): the Fabric apply, then query_dhcp_lease once the BareMetalInstance reports NetworkHandoffComplete; delete on the Fabric.
func (*NetworkAttachmentReconciler) Reconcile ¶ added in v0.0.40
func (r *NetworkAttachmentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile advances the apply or delete of a NetworkAttachment.
func (*NetworkAttachmentReconciler) SetupWithManager ¶ added in v0.0.40
func (r *NetworkAttachmentReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the controller. Subnet events re-queue its NetworkAttachments; ComputeInstance and BareMetalInstance events re-queue the NetworkAttachment of the workload.
type NetworkClassFeedbackReconciler ¶ added in v0.0.40
type NetworkClassFeedbackReconciler struct {
// contains filtered or unexported fields
}
NetworkClassFeedbackReconciler copies the NetworkClass resolution to the fulfillment record: state READY, FAILED or PENDING, message, and the private network_managers, network_type and security_group_icmp capability.
func NewNetworkClassFeedbackReconciler ¶ added in v0.0.40
func NewNetworkClassFeedbackReconciler(hubClient clnt.Client, grpcConn grpc.ClientConnInterface, networkingNamespace string) *NetworkClassFeedbackReconciler
NewNetworkClassFeedbackReconciler creates the NetworkClass feedback reconciler.
func (*NetworkClassFeedbackReconciler) Reconcile ¶ added in v0.0.40
func (r *NetworkClassFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile delegates to the shared feedback Bridge.
func (*NetworkClassFeedbackReconciler) SetupWithManager ¶ added in v0.0.40
func (r *NetworkClassFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager adds the reconciler to the controller manager.
type NetworkClassReconciler ¶ added in v0.0.40
type NetworkClassReconciler struct {
Client clnt.Client
APIReader clnt.Reader
NetworkingNamespace string
ProvisioningEnabled bool
// RegistrationNamespace is the namespace of the manager registrations (the
// operator's Helm release namespace).
RegistrationNamespace string
}
NetworkClassReconciler resolves the managers a NetworkClass selects when provisioning is enabled (network manager contract §4.2). With provisioning disabled it marks the class Ready without reading manager registrations. It runs no AAP job.
func (*NetworkClassReconciler) Reconcile ¶ added in v0.0.40
func (r *NetworkClassReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile resolves a NetworkClass that is not Ready.
func (*NetworkClassReconciler) SetupWithManager ¶ added in v0.0.40
func (r *NetworkClassReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the reconciler. When provisioning is enabled, ConfigMap events in the registration namespace re-queue every NetworkClass that is not Ready. The ConfigMaps are watched through a cache limited to that namespace, so the operator needs ConfigMap read access only there.
type NewComponentFn ¶
type NewComponentFn func(context.Context, *v1alpha1.ClusterOrder) (*appResource, error)
NewComponentFn is the type of a function that creates a required component
type ProviderNotImplementedError ¶ added in v0.0.15
type ProviderNotImplementedError struct {
Provider string
}
ProviderNotImplementedError reports the provider selected for a volume when no implementation is registered for it.
func (*ProviderNotImplementedError) Error ¶ added in v0.0.15
func (e *ProviderNotImplementedError) Error() string
func (*ProviderNotImplementedError) Unwrap ¶ added in v0.0.15
func (e *ProviderNotImplementedError) Unwrap() error
type SecretsClient ¶
type SecretsClient interface {
Get(ctx context.Context, in *privatev1.SecretsGetRequest, opts ...grpc.CallOption) (*privatev1.SecretsGetResponse, error)
}
SecretsClient is a narrow subset of the generated privatev1.SecretsClient used to resolve a storage backend's password from a referenced Secret (Get) when the backend supplies password_secret instead of an inline password. The generated client satisfies this interface automatically; it is defined here to allow test mocking (mirrors StorageBackendsClient).
type SecurityGroupFeedbackReconciler ¶
type SecurityGroupFeedbackReconciler struct {
// contains filtered or unexported fields
}
SecurityGroupFeedbackReconciler sends updates to the fulfillment service.
func NewSecurityGroupFeedbackReconciler ¶
func NewSecurityGroupFeedbackReconciler(hubClient clnt.Client, grpcConn grpc.ClientConnInterface, networkingNamespace string) *SecurityGroupFeedbackReconciler
NewSecurityGroupFeedbackReconciler creates a reconciler that sends to the fulfillment service updates about security groups.
func (*SecurityGroupFeedbackReconciler) Reconcile ¶
func (r *SecurityGroupFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile delegates to the shared feedback Bridge.
func (*SecurityGroupFeedbackReconciler) SetupWithManager ¶
func (r *SecurityGroupFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager adds the reconciler to the controller manager.
type SecurityGroupReconciler ¶
type SecurityGroupReconciler struct {
Client client.Client
Engine *networktask.Engine
NetworkingNamespace string
}
SecurityGroupReconciler runs the SecurityGroup tasks (contract §4.10): create_security_group on the Fabric, then the Kubernetes Manager, again as the next attempt on each rule update; delete in reverse order once no NetworkAttachment selects the group.
func (*SecurityGroupReconciler) Reconcile ¶
func (r *SecurityGroupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile advances the create, rule update or delete of a SecurityGroup.
func (*SecurityGroupReconciler) SetupWithManager ¶
func (r *SecurityGroupReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the controller. VirtualNetwork events re-queue its SecurityGroups; NetworkAttachment events re-queue the groups they select.
type StorageBackendsClient ¶
type StorageBackendsClient interface {
List(ctx context.Context, in *privatev1.StorageBackendsListRequest, opts ...grpc.CallOption) (*privatev1.StorageBackendsListResponse, error)
Get(ctx context.Context, in *privatev1.StorageBackendsGetRequest, opts ...grpc.CallOption) (*privatev1.StorageBackendsGetResponse, error)
}
StorageBackendsClient is a narrow subset of the generated privatev1.StorageBackendsClient used to check whether any storage backend is registered (List) and to resolve a single backend's provider and connection details by ID (Get). The generated client satisfies this interface automatically; it is defined here to allow test mocking.
type StorageReconciler ¶
type StorageReconciler struct {
client.Client
APIReader client.Reader
Scheme *runtime.Scheme
Recorder events.EventRecorder
BackendProvider provisioning.ProvisioningProvider
ClusterStorageProvider provisioning.ProvisioningProvider
StatusPollInterval time.Duration
MaxJobHistory int
// BackendsClient queries the fulfillment service Backend API to determine whether
// a storage backend is registered (List, via backendRegistered()) and to resolve
// a backend's connection details by ID (Get, via resolveTierDefinitions). When
// nil (no gRPC connection configured), both backward compatible with
// environments that run without a fulfillment service connection (e.g.
// prepare-tenant.sh).
BackendsClient StorageBackendsClient
// TiersClient queries the fulfillment service Tier API. When nil, tier
// validation and extra_vars injection are both skipped — backward compatible
// with environments without a fulfillment service connection.
TiersClient StorageTiersLister
// SecretsClient resolves a storage backend's password from a referenced Secret
// when the backend supplies password_secret instead of an inline password. When
// nil, backends that rely on password_secret are skipped (see resolveTierDefinitions);
// backends with an inline password are unaffected.
SecretsClient SecretsClient
// contains filtered or unexported fields
}
StorageReconciler reconciles storage lifecycle on Tenant CRs. It owns StorageBackendReady, ClusterStorageReady, and StorageReady conditions, status.storageClasses, status.storageBackendJobs, and status.clusterStorageJobs on the Tenant CR.
func NewStorageReconciler ¶
func NewStorageReconciler( mgr mcmanager.Manager, tenantNamespace string, targetCluster mc.ClusterName, backendProvider provisioning.ProvisioningProvider, clusterStorageProvider provisioning.ProvisioningProvider, statusPollInterval time.Duration, maxJobHistory int, ) *StorageReconciler
func (*StorageReconciler) Reconcile ¶
func (r *StorageReconciler) Reconcile(ctx context.Context, req mcreconcile.Request) (ctrl.Result, error)
func (*StorageReconciler) SetupWithManager ¶
func (r *StorageReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers StorageReconciler, its Tenant, ClusterOrder, ComputeInstance, Volume, StorageClass, Secret, and catalog-change watches, and the periodic storage catalog sync runnable with the multicluster manager.
type StorageTiersLister ¶
type StorageTiersLister interface {
List(ctx context.Context, in *privatev1.StorageTiersListRequest, opts ...grpc.CallOption) (*privatev1.StorageTiersListResponse, error)
}
StorageTiersLister is a narrow subset of the generated privatev1.StorageTiersClient used to list tier definitions. The generated client satisfies this interface automatically; it is defined here to allow test mocking (mirrors StorageBackendsClient).
type SubnetFeedbackReconciler ¶
type SubnetFeedbackReconciler struct {
// contains filtered or unexported fields
}
SubnetFeedbackReconciler sends updates to the fulfillment service.
func NewSubnetFeedbackReconciler ¶
func NewSubnetFeedbackReconciler(hubClient clnt.Client, grpcConn grpc.ClientConnInterface, networkingNamespace string) *SubnetFeedbackReconciler
NewSubnetFeedbackReconciler creates a reconciler that sends to the fulfillment service updates about subnets.
func (*SubnetFeedbackReconciler) Reconcile ¶
func (r *SubnetFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile delegates to the shared feedback Bridge.
func (*SubnetFeedbackReconciler) SetupWithManager ¶
func (r *SubnetFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager adds the reconciler to the controller manager.
type SubnetReconciler ¶
type SubnetReconciler struct {
Client client.Client
Engine *networktask.Engine
NetworkingNamespace string
}
SubnetReconciler runs the Subnet tasks (contract §4.8-§4.10): it records the address layout, runs Fabric create_subnet (accepting the network segment), then Kubernetes create_subnet with the segment, one Subnet task per VirtualNetwork at a time; delete in reverse order once no NetworkAttachment uses the Subnet.
func (*SubnetReconciler) SetupWithManager ¶
func (r *SubnetReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the controller. VirtualNetwork events re-queue its Subnets; NetworkAttachment events re-queue their Subnet; Subnet events re-queue the siblings waiting for the VirtualNetwork's Subnet-task slot.
type TenantFeedbackReconciler ¶ added in v0.0.20
type TenantFeedbackReconciler struct {
// contains filtered or unexported fields
}
TenantFeedbackReconciler signals fulfillment-service when Tenant CR status changes.
func NewTenantFeedbackReconciler ¶ added in v0.0.20
func NewTenantFeedbackReconciler(hubClient clnt.Client, grpcConn grpc.ClientConnInterface, tenantNamespace string) *TenantFeedbackReconciler
NewTenantFeedbackReconciler creates a Tenant feedback reconciler.
func (*TenantFeedbackReconciler) Reconcile ¶ added in v0.0.20
func (r *TenantFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile signals the fulfillment tenant associated with the changed CR.
func (*TenantFeedbackReconciler) SetupWithManager ¶ added in v0.0.20
func (r *TenantFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the Tenant status watch.
type TenantReconciler ¶
type TenantReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder events.EventRecorder
// contains filtered or unexported fields
}
TenantReconciler reconciles a Tenant object. Tracks tenant lifecycle (Phase, finalizer). Storage provisioning is handled by the OSAC Storage Controller.
func NewTenantReconciler ¶
func NewTenantReconciler( mgr mcmanager.Manager, tenantNamespace string, ) *TenantReconciler
func (*TenantReconciler) Reconcile ¶
func (r *TenantReconciler) Reconcile(ctx context.Context, req mcreconcile.Request) (ctrl.Result, error)
func (*TenantReconciler) SetupWithManager ¶
func (r *TenantReconciler) SetupWithManager(mgr mcmanager.Manager) error
type TrustServiceAccountToken ¶ added in v0.0.19
type TrustTokenIssuer ¶ added in v0.0.19
type TrustTokenIssuer interface {
Issue(context.Context, []byte, string, string, string, string) (TrustServiceAccountToken, error)
}
TrustTokenIssuer uses the hosted-cluster kubeconfig only to validate the preinstalled trust identities and request short-lived service-account tokens.
type VastVendorProvisioner ¶
type VastVendorProvisioner struct {
// contains filtered or unexported fields
}
VastVendorProvisioner is the production VendorProvisioner. It provisions volumes by calling a vendor CSI controller (deployed per backend, e.g. the VAST CSI controller) directly over gRPC, passing per-tenant credentials in the CSI secrets field. The per-tenant credentials and VAST-side resource references are read from the hub Secret "vast-tenant-config-<tenant>" created during tenant onboarding.
Only block volumes are implemented today. The exact CSI CreateVolume contract is verified against the upstream VAST CSI driver at the tag this deployment pins (docker.io/vastdataorg/csi:v2.6.5):
https://github.com/vast-data/vast-csi/blob/v2.6.5/vast_csi/builders/block.py
The block builder requires the "subsystem" parameter (the VAST view, created during onboarding and named "view-<tenant>-<uid_hash>-<tier>"), a VIP pool, and username/password/endpoint in secrets. NFS uses a different parameter set (root_export + view_policy) and is not implemented here yet.
func NewVastVendorProvisioner ¶
func NewVastVendorProvisioner(reader client.Reader, configNamespace string, endpoints map[string]string) (*VastVendorProvisioner, error)
NewVastVendorProvisioner constructs a VastVendorProvisioner and fails fast on invalid configuration: at least one provider->endpoint mapping is required so the operator errors loudly at startup rather than running degraded and leaving volumes stuck in Progressing.
func (*VastVendorProvisioner) CreateVolume ¶
func (p *VastVendorProvisioner) CreateVolume(ctx context.Context, req VendorCreateVolumeRequest) (VendorCreateVolumeResponse, error)
CreateVolume provisions a block volume on the vendor array. It reads the per-tenant credentials/config from the hub Secret, resolves the vendor controller endpoint from the provider name, and issues a CSI CreateVolume with the credentials in the secrets field. CSI CreateVolume is idempotent, so a retried call for an existing volume returns that volume rather than erroring.
func (*VastVendorProvisioner) DeleteVolume ¶
func (p *VastVendorProvisioner) DeleteVolume(ctx context.Context, req VendorDeleteVolumeRequest) error
DeleteVolume deprovisions the vendor volume. CSI DeleteVolume is idempotent: a NotFound response is treated as success so a retried delete of an already-removed volume does not block finalizer removal.
type VendorCreateVolumeRequest ¶
type VendorCreateVolumeRequest struct {
Name string
UID string
Provider string
Tenant string
Tier string
SizeGiB int64
AccessMode v1alpha1.VolumeAccessMode
Protocol v1alpha1.VolumeProtocol
Topology v1alpha1.VolumeTopology
// VendorContext contains opaque state returned by a previous create call.
// It lets asynchronous provisioners resume an in-progress operation without
// creating a second backend resource after a reconcile.
VendorContext map[string]string
}
VendorCreateVolumeRequest carries the provider-neutral parameters needed to provision a volume. Provider and Protocol are resolved by the fulfillment-service before the Volume CR is created; the operator passes them through to the selected implementation without re-resolving. Tenant and Tier let the vendor implementation select the per-tenant credentials and construct the per-tenant/per-tier vendor resource references (e.g. the VAST subsystem/view name) without re-deriving them.
type VendorCreateVolumeResponse ¶
type VendorCreateVolumeResponse struct {
VendorVolumeID string
Protocol string
// Pending indicates that the vendor resource exists but is not ready yet.
// The volume controller persists VendorContext and waits for the vendor
// resource watch to report a state change.
Pending bool
// VendorContext holds the backend-specific attach parameters used for this vendor's
// CreateVolume call (for example VAST's "subsystem" and "vip_pool_name"). Opaque to the
// operator: synced to fulfillment-service and forwarded unchanged by osac-csi-driver to the
// vendor CSI controller's ControllerPublishVolume, since that call needs the same parameters
// CreateVolume used and has no other way to obtain them.
VendorContext map[string]string
}
VendorCreateVolumeResponse carries the vendor-assigned identifiers that the feedback controller syncs back to the fulfillment-service inventory.
type VendorDeleteVolumeRequest ¶
type VendorDeleteVolumeRequest struct {
// Name is the OSAC Volume resource name and is the authoritative owner
// identity for CR-based provisioners.
Name string
// UID is the immutable UID of the OSAC Volume resource.
UID string
VendorVolumeID string
Provider string
Tenant string
VendorContext map[string]string
}
VendorDeleteVolumeRequest identifies the vendor volume to deprovision. Tenant lets the vendor implementation select the per-tenant credentials needed to authenticate the deprovision call.
type VendorProvisioner ¶
type VendorProvisioner interface {
CreateVolume(ctx context.Context, req VendorCreateVolumeRequest) (VendorCreateVolumeResponse, error)
DeleteVolume(ctx context.Context, req VendorDeleteVolumeRequest) error
}
VendorProvisioner abstracts vendor storage array operations. Unlike other OSAC resources that provision through AAP (RunProvisioningLifecycle), volumes are provisioned by calling the vendor CSI controller directly. This interface decouples the controller from the vendor implementation, allowing a mock for testing and development while the real vendor CSI client is wired in PR #3.
type VendorProvisionerRegistry ¶ added in v0.0.15
type VendorProvisionerRegistry map[string]VendorProvisioner
VendorProvisionerRegistry selects a provider-specific implementation by the provider resolved by the fulfillment-service.
func (VendorProvisionerRegistry) Lookup ¶ added in v0.0.15
func (r VendorProvisionerRegistry) Lookup(provider string) (VendorProvisioner, error)
Lookup returns the implementation registered for provider. A nil or absent entry is treated as unimplemented so a partially populated registry cannot result in a nil-interface panic during reconciliation.
type VirtualNetworkFeedbackReconciler ¶
type VirtualNetworkFeedbackReconciler struct {
// contains filtered or unexported fields
}
VirtualNetworkFeedbackReconciler sends updates to the fulfillment service.
func NewVirtualNetworkFeedbackReconciler ¶
func NewVirtualNetworkFeedbackReconciler(hubClient clnt.Client, grpcConn grpc.ClientConnInterface, networkingNamespace string) *VirtualNetworkFeedbackReconciler
NewVirtualNetworkFeedbackReconciler creates a reconciler that sends to the fulfillment service updates about virtual networks.
func (*VirtualNetworkFeedbackReconciler) Reconcile ¶
func (r *VirtualNetworkFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile delegates to the shared feedback Bridge.
func (*VirtualNetworkFeedbackReconciler) SetupWithManager ¶
func (r *VirtualNetworkFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager adds the reconciler to the controller manager.
type VirtualNetworkReconciler ¶
type VirtualNetworkReconciler struct {
Client client.Client
Engine *networktask.Engine
NetworkingNamespace string
}
VirtualNetworkReconciler runs the VirtualNetwork tasks (contract §4.10): Fabric create_virtual_network, then Kubernetes create_virtual_network when the NetworkClass selects a Kubernetes Manager; delete in reverse order once every child is gone.
func (*VirtualNetworkReconciler) Reconcile ¶
func (r *VirtualNetworkReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile advances the create or delete of a VirtualNetwork.
func (*VirtualNetworkReconciler) SetupWithManager ¶
func (r *VirtualNetworkReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the controller. NetworkClass events re-queue waiting VirtualNetworks; child events re-queue a VirtualNetwork being deleted.
type VolumeFeedbackReconciler ¶
type VolumeFeedbackReconciler struct {
// contains filtered or unexported fields
}
VolumeFeedbackReconciler syncs Volume CR status from the hub cluster back to the fulfillment-service via the private Volumes gRPC API. It maps CRD phases to proto states and copies vendor-assigned fields (vendorVolumeID, provider, protocol, and a tenant-safe failure message) so the fulfillment-service inventory stays current.
func NewVolumeFeedbackReconciler ¶
func NewVolumeFeedbackReconciler(hubClient clnt.Client, grpcConn grpc.ClientConnInterface, volumeNamespace string) *VolumeFeedbackReconciler
NewVolumeFeedbackReconciler creates a feedback reconciler that syncs Volume CR status to the fulfillment-service. The volumeNamespace controls which namespace this controller watches, matching the resource controller's scope.
func (*VolumeFeedbackReconciler) Reconcile ¶
func (r *VolumeFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)
Reconcile delegates to the shared feedback Bridge which handles the finalizer lifecycle, clone-compare-save, and last-finalizer Signal.
func (*VolumeFeedbackReconciler) SetupWithManager ¶
func (r *VolumeFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the feedback controller with the manager. It watches Volume CRs in the configured namespace on the local (hub) cluster.
type VolumeReconciler ¶
type VolumeReconciler struct {
client.Client
Scheme *runtime.Scheme
VolumeNamespace string
VendorProvisioners VendorProvisionerRegistry
// contains filtered or unexported fields
}
VolumeReconciler reconciles Volume CRs created by the fulfillment-service reconciler. It selects a provider-specific VendorProvisioner to create volumes on the backend storage array and updates the CR status with vendor-assigned identifiers. The feedback controller then syncs that status back to fulfillment-service.
Unlike networking and compute controllers that use AAP for provisioning, this controller invokes a provider-specific provisioner directly. A provisioner may complete synchronously or persist backend state and ask the controller to requeue while that state becomes ready.
func NewVolumeReconciler ¶
func NewVolumeReconciler( mgr mcmanager.Manager, volumeNamespace string, provisioners VendorProvisionerRegistry, ) *VolumeReconciler
NewVolumeReconciler creates a new reconciler for Volume resources. The volumeNamespace controls which namespace the controller watches; in production this is set via OSAC_VOLUME_NAMESPACE (same as the Helm release namespace), defaulting to "osac-volume" for local development.
func (*VolumeReconciler) Reconcile ¶
func (r *VolumeReconciler) Reconcile(ctx context.Context, req mcreconcile.Request) (ctrl.Result, error)
Reconcile is part of the main Kubernetes reconciliation loop. It drives Volume CRs through the provisioning lifecycle: Progressing -> Ready (on success) or Failed (on vendor error), and handles deletion by calling the vendor to deprovision before removing the finalizer.
func (*VolumeReconciler) SetupWithManager ¶
func (r *VolumeReconciler) SetupWithManager(mgr mcmanager.Manager) error
SetupWithManager registers the Volume controller with the manager. It always watches Volume CRs, and watches owned TopoLVM LogicalVolumes only when an LVMS provisioner is configured. TopoLVM is optional, so registering that watch without LVMS would make manager startup depend on an absent CRD.
Source Files
¶
- auto_external_ip_attachment.go
- auto_external_ip_cleanup.go
- baremetalinstance_cleanup_controller.go
- baremetalinstance_feedback_controller.go
- baremetalinstance_names.go
- clusterorder_addon_operator_controller.go
- clusterorder_controller.go
- clusterorder_names.go
- clusterorder_observed_versions.go
- clusterorder_resources.go
- clusterorder_upgrade_observation.go
- computeinstance_controller.go
- computeinstance_feedback_controller.go
- computeinstance_names.go
- computeinstance_resources.go
- constants_common.go
- externalip_controller.go
- externalip_feedback_controller.go
- externalip_names.go
- externalipattachment_controller.go
- externalipattachment_feedback_controller.go
- externalipattachment_names.go
- externalippool_controller.go
- externalippool_feedback_controller.go
- externalippool_names.go
- fabricdomain_controller.go
- fabricdomain_feedback_controller.go
- fabricdomain_names.go
- fabricdomain_observability.go
- feedback_controller.go
- feedback_sanitize.go
- feedback_update_masks.go
- fulfillment_trust_controller.go
- fulfillment_trust_target.go
- lvms_vendor_provisioner.go
- multicluster_common.go
- natgateway_contract.go
- natgateway_controller.go
- natgateway_feedback_controller.go
- natgateway_names.go
- networkattachment_controller.go
- networkclass_controller.go
- networking_common.go
- networking_feedback_state.go
- networking_rbac.go
- networking_transition_time.go
- provisioning_conditions.go
- securitygroup_controller.go
- securitygroup_feedback_controller.go
- securitygroup_names.go
- storage_controller.go
- storage_tier_definitions.go
- storage_tier_resolution.go
- subnet_controller.go
- subnet_feedback_controller.go
- subnet_names.go
- tenant_controller.go
- tenant_feedback_controller.go
- tenant_names.go
- vast_vendor_provisioner.go
- vendor_provisioner_registry.go
- virtualnetwork_controller.go
- virtualnetwork_feedback_controller.go
- virtualnetwork_names.go
- volume_controller.go
- volume_feedback_controller.go
- volume_names.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package baremetalworker reconciles ClusterOrder bare-metal NodeSets through fulfillment BareMetalInstances and Assisted Service Agents.
|
Package baremetalworker reconciles ClusterOrder bare-metal NodeSets through fulfillment BareMetalInstances and Assisted Service Agents. |
|
Package feedback provides shared reconciliation infrastructure for feedback controllers.
|
Package feedback provides shared reconciliation infrastructure for feedback controllers. |