controller

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Overview

Package controller implements the controller logic

Index

Constants

View Source
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"
)
View Source
const (
	DefaultBareMetalInstanceNamespace string = "osac-baremetalinstance"
)

Variables

View Source
var ErrExternalIPAttachmentNotFound = errors.New("external IP attachment not found in fulfillment service")
View Source
var ErrExternalIPNotFound = errors.New("external IP not found in fulfillment service")
View Source
var ErrPublicIPAttachmentNotFound = errors.New("public IP attachment not found in fulfillment service")
View Source
var ErrPublicIPNotFound = errors.New("public IP not found in fulfillment service")
View Source
var ErrTenantBeingDeleted = errors.New("tenant is being deleted")

ErrTenantBeingDeleted is returned by getTenant when the tenant exists but has DeletionTimestamp set.

Functions

func BareMetalInstanceNamespacePredicate added in v0.0.4

func BareMetalInstanceNamespacePredicate(namespace string) predicate.Predicate

BareMetalInstanceNamespacePredicate filters events to a specific namespace.

func ComputeInstanceNamespacePredicate

func ComputeInstanceNamespacePredicate(namespace string) predicate.Predicate

func NamespacePredicate

func NamespacePredicate(namespace string) predicate.Predicate

func NetworkingNamespacePredicate

func NetworkingNamespacePredicate(namespace string) predicate.Predicate

NetworkingNamespacePredicate filters events by namespace for networking resources.

Types

type BareMetalInstanceFeedbackReconciler added in v0.0.4

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

BareMetalInstanceFeedbackReconciler watches BareMetalInstance CRs and signals the fulfillment-service when their status changes.

func NewBareMetalInstanceFeedbackReconciler added in v0.0.4

func NewBareMetalInstanceFeedbackReconciler(hubClient clnt.Client, grpcConn *grpc.ClientConn, bareMetalInstanceNamespace string) *BareMetalInstanceFeedbackReconciler

NewBareMetalInstanceFeedbackReconciler creates a reconciler that signals the fulfillment-service when BareMetalInstance CRs change.

func (*BareMetalInstanceFeedbackReconciler) Reconcile added in v0.0.4

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 added in v0.0.4

SetupWithManager adds the reconciler to the controller manager.

type ClusterOrderReconciler

type ClusterOrderReconciler struct {
	client.Client

	Scheme                *runtime.Scheme
	ClusterOrderNamespace string
	ProvisioningProvider  provisioning.ProvisioningProvider
	StatusPollInterval    time.Duration
	MaxJobHistory         int
	// 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,
	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 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.ClientConn, 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) (result ctrl.Result, err error)

Reconcile is the implementation of the reconciler interface.

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
	Scheme   *runtime.Scheme
	Recorder events.EventRecorder

	ComputeInstanceNamespace string
	TenantNamespace          string
	NetworkingNamespace      string
	ProvisioningProvider     provisioning.ProvisioningProvider
	// StatusPollInterval defines how often to check provisioning job status
	StatusPollInterval time.Duration
	// MaxJobHistory defines how many jobs to keep per job array
	MaxJobHistory int
	// contains filtered or unexported fields
}

ComputeInstanceReconciler reconciles a ComputeInstance object

func NewComputeInstanceReconciler

func NewComputeInstanceReconciler(
	mgr mcmanager.Manager,
	computeInstanceNamespace string,
	tenantNamespace string,
	networkingNamespace string,
	provisioningProvider provisioning.ProvisioningProvider,
	statusPollInterval time.Duration,
	maxJobHistory int,
	targetCluster mc.ClusterName,
) *ComputeInstanceReconciler

func (*ComputeInstanceReconciler) Reconcile

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 added in v0.0.5

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

func NewExternalIPAttachmentFeedbackReconciler added in v0.0.5

func NewExternalIPAttachmentFeedbackReconciler(hubClient clnt.Client, grpcConn *grpc.ClientConn, networkingNamespace string) *ExternalIPAttachmentFeedbackReconciler

func (*ExternalIPAttachmentFeedbackReconciler) Reconcile added in v0.0.5

func (*ExternalIPAttachmentFeedbackReconciler) SetupWithManager added in v0.0.5

type ExternalIPAttachmentReconciler added in v0.0.5

type ExternalIPAttachmentReconciler struct {
	client.Client
	APIReader client.Reader
	Scheme    *runtime.Scheme

	NetworkingNamespace      string
	ComputeInstanceNamespace string
	ProvisioningProvider     provisioning.ProvisioningProvider
	StatusPollInterval       time.Duration
	MaxJobHistory            int
	// contains filtered or unexported fields
}

ExternalIPAttachmentReconciler reconciles ExternalIPAttachment CRs.

Creating a ExternalIPAttachment triggers an attach operation (osac-attach-external-ip AAP template) that moves the MetalLB Service from the parking namespace to the VM namespace. Deleting the CR triggers detach (osac-detach-external-ip) which reverses that.

The controller uses RunProvisioningLifecycle for provisioning, giving automatic exponential-backoff retry on failure. It also watches ComputeInstance resources to auto-delete the ExternalIPAttachment when the target CI is deleted.

func NewExternalIPAttachmentReconciler added in v0.0.5

func NewExternalIPAttachmentReconciler(
	mgr mcmanager.Manager,
	networkingNamespace string,
	computeInstanceNamespace string,
	provisioningProvider provisioning.ProvisioningProvider,
	statusPollInterval time.Duration,
	maxJobHistory int,
	targetCluster mc.ClusterName,
) *ExternalIPAttachmentReconciler

NewExternalIPAttachmentReconciler creates a new reconciler for ExternalIPAttachment resources.

func (*ExternalIPAttachmentReconciler) Reconcile added in v0.0.5

Reconcile handles create/update/delete for a ExternalIPAttachment CR.

func (*ExternalIPAttachmentReconciler) SetupWithManager added in v0.0.5

func (r *ExternalIPAttachmentReconciler) SetupWithManager(mgr mcmanager.Manager) error

SetupWithManager registers this controller with the multicluster manager.

type ExternalIPFeedbackReconciler added in v0.0.5

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

ExternalIPFeedbackReconciler sends updates to the fulfillment service.

func NewExternalIPFeedbackReconciler added in v0.0.5

func NewExternalIPFeedbackReconciler(hubClient clnt.Client, grpcConn *grpc.ClientConn, networkingNamespace string) *ExternalIPFeedbackReconciler

NewExternalIPFeedbackReconciler creates a reconciler that sends to the fulfillment service updates about external IPs.

func (*ExternalIPFeedbackReconciler) Reconcile added in v0.0.5

func (r *ExternalIPFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)

Reconcile is the implementation of the reconciler interface.

func (*ExternalIPFeedbackReconciler) SetupWithManager added in v0.0.5

func (r *ExternalIPFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error

SetupWithManager adds the reconciler to the controller manager.

type ExternalIPPoolFeedbackReconciler added in v0.0.5

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

ExternalIPPoolFeedbackReconciler watches ExternalIPPool CRs on the hub cluster and reports their phase and capacity back to the fulfillment service via gRPC. This is the reverse channel: the provisioning controller drives the CR forward, while this controller keeps the fulfillment service in sync with the CR's current state.

func NewExternalIPPoolFeedbackReconciler added in v0.0.5

func NewExternalIPPoolFeedbackReconciler(hubClient clnt.Client, grpcConn *grpc.ClientConn, networkingNamespace string) *ExternalIPPoolFeedbackReconciler

NewExternalIPPoolFeedbackReconciler creates a reconciler that sends to the fulfillment service updates about external IP pools.

func (*ExternalIPPoolFeedbackReconciler) Reconcile added in v0.0.5

func (r *ExternalIPPoolFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (result ctrl.Result, err error)

Reconcile syncs the ExternalIPPool CR's phase and capacity to the fulfillment service. The flow has six steps:

  1. Fetch the CR (exit if deleted between event and processing)
  2. Check for the fulfillment-service ID label (skip manually-created CRs)
  3. Fetch the current proto record from the fulfillment service (handle NotFound during deletion)
  4. Map CR state to proto state via handleUpdate/handleDelete
  5. Persist changes via gRPC Update (only if proto.Equal detects a diff)
  6. On deletion: remove finalizer and Signal the fulfillment service to re-reconcile immediately

func (*ExternalIPPoolFeedbackReconciler) SetupWithManager added in v0.0.5

func (r *ExternalIPPoolFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error

SetupWithManager registers this controller with controller-runtime. Named("externalippool-feedback") distinguishes it from the provisioning controller, which also watches ExternalIPPool CRs. The namespace predicate limits reconciliation to CRs in the networking namespace.

type ExternalIPPoolReconciler added in v0.0.5

type ExternalIPPoolReconciler struct {
	client.Client
	APIReader client.Reader
	Scheme    *runtime.Scheme

	NetworkingNamespace  string
	ProvisioningProvider provisioning.ProvisioningProvider
	StatusPollInterval   time.Duration
	MaxJobHistory        int
	// contains filtered or unexported fields
}

ExternalIPPoolReconciler reconciles ExternalIPPool CRs created by the fulfillment-service.

A ExternalIPPool defines a range of external IP addresses (CIDRs) that can be allocated as individual ExternalIP resources. Unlike ExternalIP (which inherits its strategy from the parent pool), ExternalIPPool reads the implementation strategy from its own spec.

The controller adds a finalizer, triggers AAP provisioning/deprovisioning jobs via the shared provisioning lifecycle, and transitions phases: "" -> Progressing -> Ready/Failed; on delete: Deleting.

func NewExternalIPPoolReconciler added in v0.0.5

func NewExternalIPPoolReconciler(
	mgr mcmanager.Manager,
	networkingNamespace string,
	provisioningProvider provisioning.ProvisioningProvider,
	statusPollInterval time.Duration,
	maxJobHistory int,
	targetCluster mc.ClusterName,
) *ExternalIPPoolReconciler

NewExternalIPPoolReconciler creates a new reconciler for ExternalIPPool resources.

func (*ExternalIPPoolReconciler) Reconcile added in v0.0.5

Reconcile handles create/update/delete for a ExternalIPPool CR. On create/update it ensures a finalizer, reads the implementation strategy from spec, and runs provisioning. On delete it triggers deprovisioning and removes the finalizer.

func (*ExternalIPPoolReconciler) SetupWithManager added in v0.0.5

func (r *ExternalIPPoolReconciler) SetupWithManager(mgr mcmanager.Manager) error

SetupWithManager registers this controller with the multicluster manager. It watches ExternalIPPool CRs in the networking namespace on the local cluster only.

type ExternalIPReconciler added in v0.0.5

type ExternalIPReconciler struct {
	client.Client
	APIReader client.Reader
	Scheme    *runtime.Scheme
	Recorder  events.EventRecorder

	NetworkingNamespace  string
	ProvisioningProvider provisioning.ProvisioningProvider
	StatusPollInterval   time.Duration
	MaxJobHistory        int
	// contains filtered or unexported fields
}

ExternalIPReconciler reconciles ExternalIP CRs created by the fulfillment-service.

Each ExternalIP belongs to a parent ExternalIPPool (referenced by UUID in spec.pool). The controller adds a finalizer, inherits the implementation strategy from the parent pool, then delegates to the shared provisioning lifecycle to trigger AAP jobs for allocation and deallocation.

Attach/detach is handled by the ExternalIPAttachment controller.

Phase transitions: "" -> Progressing -> Ready/Failed; on delete: Deleting.

func NewExternalIPReconciler added in v0.0.5

func NewExternalIPReconciler(
	mgr mcmanager.Manager,
	networkingNamespace string,
	provisioningProvider provisioning.ProvisioningProvider,
	statusPollInterval time.Duration,
	maxJobHistory int,
	targetCluster mc.ClusterName,
) *ExternalIPReconciler

NewExternalIPReconciler creates a new reconciler for ExternalIP resources.

func (*ExternalIPReconciler) Reconcile added in v0.0.5

Reconcile handles create/update/delete for a ExternalIP CR. On create/update it ensures a finalizer, resolves the parent pool, and runs provisioning. On delete it triggers deprovisioning and removes the finalizer when complete.

func (*ExternalIPReconciler) SetupWithManager added in v0.0.5

func (r *ExternalIPReconciler) SetupWithManager(mgr mcmanager.Manager) error

SetupWithManager registers this controller with the multicluster manager. It watches ExternalIP CRs in the networking namespace on the local cluster only.

type FeedbackReconciler

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

FeedbackReconciler sends updates to the fulfillment service.

func NewFeedbackReconciler

func NewFeedbackReconciler(logger logr.Logger, hubClient clnt.Client, grpcConn *grpc.ClientConn, clusterOrderNamespace string) *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) (result ctrl.Result, err error)

Reconcile is the implementation of the reconciler interface.

func (*FeedbackReconciler) SetupWithManager

func (r *FeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error

SetupWithManager adds the reconciler to the controller manager.

type NewComponentFn

type NewComponentFn func(context.Context, *v1alpha1.ClusterOrder) (*appResource, error)

NewComponentFn is the type of a function that creates a required component

type PublicIPAttachmentFeedbackReconciler

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

func NewPublicIPAttachmentFeedbackReconciler

func NewPublicIPAttachmentFeedbackReconciler(hubClient clnt.Client, grpcConn *grpc.ClientConn, networkingNamespace string) *PublicIPAttachmentFeedbackReconciler

func (*PublicIPAttachmentFeedbackReconciler) Reconcile

func (*PublicIPAttachmentFeedbackReconciler) SetupWithManager

type PublicIPAttachmentReconciler

type PublicIPAttachmentReconciler struct {
	client.Client
	APIReader client.Reader
	Scheme    *runtime.Scheme

	NetworkingNamespace      string
	ComputeInstanceNamespace string
	ProvisioningProvider     provisioning.ProvisioningProvider
	StatusPollInterval       time.Duration
	MaxJobHistory            int
	// contains filtered or unexported fields
}

PublicIPAttachmentReconciler reconciles PublicIPAttachment CRs.

Creating a PublicIPAttachment triggers an attach operation (osac-attach-public-ip AAP template) that moves the MetalLB Service from the parking namespace to the VM namespace. Deleting the CR triggers detach (osac-detach-public-ip) which reverses that.

The controller uses RunProvisioningLifecycle for provisioning, giving automatic exponential-backoff retry on failure. It also watches ComputeInstance resources to auto-delete the PublicIPAttachment when the target CI is deleted.

func NewPublicIPAttachmentReconciler

func NewPublicIPAttachmentReconciler(
	mgr mcmanager.Manager,
	networkingNamespace string,
	computeInstanceNamespace string,
	provisioningProvider provisioning.ProvisioningProvider,
	statusPollInterval time.Duration,
	maxJobHistory int,
	targetCluster mc.ClusterName,
) *PublicIPAttachmentReconciler

NewPublicIPAttachmentReconciler creates a new reconciler for PublicIPAttachment resources.

func (*PublicIPAttachmentReconciler) Reconcile

Reconcile handles create/update/delete for a PublicIPAttachment CR.

func (*PublicIPAttachmentReconciler) SetupWithManager

func (r *PublicIPAttachmentReconciler) SetupWithManager(mgr mcmanager.Manager) error

SetupWithManager registers this controller with the multicluster manager.

type PublicIPFeedbackReconciler

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

PublicIPFeedbackReconciler sends updates to the fulfillment service.

func NewPublicIPFeedbackReconciler

func NewPublicIPFeedbackReconciler(hubClient clnt.Client, grpcConn *grpc.ClientConn, networkingNamespace string) *PublicIPFeedbackReconciler

NewPublicIPFeedbackReconciler creates a reconciler that sends to the fulfillment service updates about public IPs.

func (*PublicIPFeedbackReconciler) Reconcile

func (r *PublicIPFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)

Reconcile is the implementation of the reconciler interface.

func (*PublicIPFeedbackReconciler) SetupWithManager

func (r *PublicIPFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error

SetupWithManager adds the reconciler to the controller manager.

type PublicIPPoolFeedbackReconciler

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

PublicIPPoolFeedbackReconciler watches PublicIPPool CRs on the hub cluster and reports their phase and capacity back to the fulfillment service via gRPC. This is the reverse channel: the provisioning controller drives the CR forward, while this controller keeps the fulfillment service in sync with the CR's current state.

func NewPublicIPPoolFeedbackReconciler

func NewPublicIPPoolFeedbackReconciler(hubClient clnt.Client, grpcConn *grpc.ClientConn, networkingNamespace string) *PublicIPPoolFeedbackReconciler

NewPublicIPPoolFeedbackReconciler creates a reconciler that sends to the fulfillment service updates about public IP pools.

func (*PublicIPPoolFeedbackReconciler) Reconcile

func (r *PublicIPPoolFeedbackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (result ctrl.Result, err error)

Reconcile syncs the PublicIPPool CR's phase and capacity to the fulfillment service. The flow has six steps:

  1. Fetch the CR (exit if deleted between event and processing)
  2. Check for the fulfillment-service ID label (skip manually-created CRs)
  3. Fetch the current proto record from the fulfillment service (handle NotFound during deletion)
  4. Map CR state to proto state via handleUpdate/handleDelete
  5. Persist changes via gRPC Update (only if proto.Equal detects a diff)
  6. On deletion: remove finalizer and Signal the fulfillment service to re-reconcile immediately

func (*PublicIPPoolFeedbackReconciler) SetupWithManager

func (r *PublicIPPoolFeedbackReconciler) SetupWithManager(mgr mcmanager.Manager) error

SetupWithManager registers this controller with controller-runtime. Named("publicippool-feedback") distinguishes it from the provisioning controller, which also watches PublicIPPool CRs. The namespace predicate limits reconciliation to CRs in the networking namespace.

type PublicIPPoolReconciler

type PublicIPPoolReconciler struct {
	client.Client
	APIReader client.Reader
	Scheme    *runtime.Scheme

	NetworkingNamespace  string
	ProvisioningProvider provisioning.ProvisioningProvider
	StatusPollInterval   time.Duration
	MaxJobHistory        int
	// contains filtered or unexported fields
}

PublicIPPoolReconciler reconciles PublicIPPool CRs created by the fulfillment-service.

A PublicIPPool defines a range of public IP addresses (CIDRs) that can be allocated as individual PublicIP resources. Unlike PublicIP (which inherits its strategy from the parent pool), PublicIPPool reads the implementation strategy from its own spec.

The controller adds a finalizer, triggers AAP provisioning/deprovisioning jobs via the shared provisioning lifecycle, and transitions phases: "" -> Progressing -> Ready/Failed; on delete: Deleting.

func NewPublicIPPoolReconciler

func NewPublicIPPoolReconciler(
	mgr mcmanager.Manager,
	networkingNamespace string,
	provisioningProvider provisioning.ProvisioningProvider,
	statusPollInterval time.Duration,
	maxJobHistory int,
	targetCluster mc.ClusterName,
) *PublicIPPoolReconciler

NewPublicIPPoolReconciler creates a new reconciler for PublicIPPool resources.

func (*PublicIPPoolReconciler) Reconcile

Reconcile handles create/update/delete for a PublicIPPool CR. On create/update it ensures a finalizer, reads the implementation strategy from spec, and runs provisioning. On delete it triggers deprovisioning and removes the finalizer.

func (*PublicIPPoolReconciler) SetupWithManager

func (r *PublicIPPoolReconciler) SetupWithManager(mgr mcmanager.Manager) error

SetupWithManager registers this controller with the multicluster manager. It watches PublicIPPool CRs in the networking namespace on the local cluster only.

type PublicIPReconciler

type PublicIPReconciler struct {
	client.Client
	APIReader client.Reader
	Scheme    *runtime.Scheme
	Recorder  events.EventRecorder

	NetworkingNamespace  string
	ProvisioningProvider provisioning.ProvisioningProvider
	StatusPollInterval   time.Duration
	MaxJobHistory        int
	// contains filtered or unexported fields
}

PublicIPReconciler reconciles PublicIP CRs created by the fulfillment-service.

Each PublicIP belongs to a parent PublicIPPool (referenced by UUID in spec.pool). The controller adds a finalizer, inherits the implementation strategy from the parent pool, then delegates to the shared provisioning lifecycle to trigger AAP jobs for allocation and deallocation.

Attach/detach is handled by the PublicIPAttachment controller.

Phase transitions: "" -> Progressing -> Ready/Failed; on delete: Deleting.

func NewPublicIPReconciler

func NewPublicIPReconciler(
	mgr mcmanager.Manager,
	networkingNamespace string,
	provisioningProvider provisioning.ProvisioningProvider,
	statusPollInterval time.Duration,
	maxJobHistory int,
	targetCluster mc.ClusterName,
) *PublicIPReconciler

NewPublicIPReconciler creates a new reconciler for PublicIP resources.

func (*PublicIPReconciler) Reconcile

Reconcile handles create/update/delete for a PublicIP CR. On create/update it ensures a finalizer, resolves the parent pool, and runs provisioning. On delete it triggers deprovisioning and removes the finalizer when complete.

func (*PublicIPReconciler) SetupWithManager

func (r *PublicIPReconciler) SetupWithManager(mgr mcmanager.Manager) error

SetupWithManager registers this controller with the multicluster manager. It watches PublicIP CRs in the networking namespace on the local cluster only.

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.ClientConn, 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) (result ctrl.Result, err error)

Reconcile is the implementation of the reconciler interface.

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
	APIReader client.Reader
	Scheme    *runtime.Scheme

	NetworkingNamespace  string
	ProvisioningProvider provisioning.ProvisioningProvider
	StatusPollInterval   time.Duration
	MaxJobHistory        int
	// contains filtered or unexported fields
}

SecurityGroupReconciler reconciles a SecurityGroup object

func NewSecurityGroupReconciler

func NewSecurityGroupReconciler(
	mgr mcmanager.Manager,
	networkingNamespace string,
	provisioningProvider provisioning.ProvisioningProvider,
	statusPollInterval time.Duration,
	maxJobHistory int,
	targetCluster mc.ClusterName,
) *SecurityGroupReconciler

NewSecurityGroupReconciler creates a new reconciler for SecurityGroup resources.

func (*SecurityGroupReconciler) Reconcile

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 (*SecurityGroupReconciler) SetupWithManager

func (r *SecurityGroupReconciler) SetupWithManager(mgr mcmanager.Manager) error

SetupWithManager sets up the controller with the Manager.

type StorageReconciler added in v0.0.4

type StorageReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder events.EventRecorder

	BackendProvider        provisioning.ProvisioningProvider
	ClusterStorageProvider provisioning.ProvisioningProvider
	StatusPollInterval     time.Duration
	MaxJobHistory          int
	// contains filtered or unexported fields
}

StorageReconciler reconciles storage lifecycle on Tenant CRs. It owns StorageBackendReady, ClusterStorageReady conditions, status.storageClasses, status.storageBackendJobs, and status.clusterStorageJobs on the Tenant CR.

func NewStorageReconciler added in v0.0.4

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 added in v0.0.4

func (*StorageReconciler) SetupWithManager added in v0.0.4

func (r *StorageReconciler) SetupWithManager(mgr mcmanager.Manager) error

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.ClientConn, 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) (result ctrl.Result, err error)

Reconcile is the implementation of the reconciler interface.

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
	APIReader client.Reader
	Scheme    *runtime.Scheme

	NetworkingNamespace  string
	ProvisioningProvider provisioning.ProvisioningProvider
	StatusPollInterval   time.Duration
	MaxJobHistory        int
	// contains filtered or unexported fields
}

SubnetReconciler reconciles a Subnet object

func NewSubnetReconciler

func NewSubnetReconciler(
	mgr mcmanager.Manager,
	networkingNamespace string,
	provisioningProvider provisioning.ProvisioningProvider,
	statusPollInterval time.Duration,
	maxJobHistory int,
	targetCluster mc.ClusterName,
) *SubnetReconciler

NewSubnetReconciler creates a new reconciler for Subnet resources.

func (*SubnetReconciler) Reconcile

func (r *SubnetReconciler) 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 (*SubnetReconciler) SetupWithManager

func (r *SubnetReconciler) SetupWithManager(mgr mcmanager.Manager) error

SetupWithManager sets up the controller with the Manager.

type TenantReconciler

type TenantReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder events.EventRecorder
	// contains filtered or unexported fields
}

TenantReconciler reconciles a Tenant object. Tracks namespace readiness and tenant lifecycle (Phase, finalizer). Storage provisioning is handled by the OSAC Storage Controller.

func NewTenantReconciler

func NewTenantReconciler(
	mgr mcmanager.Manager,
	tenantNamespace string,
	targetCluster mc.ClusterName,
) *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 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.ClientConn, 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) (result ctrl.Result, err error)

Reconcile is the implementation of the reconciler interface.

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
	APIReader client.Reader
	Scheme    *runtime.Scheme

	NetworkingNamespace  string
	ProvisioningProvider provisioning.ProvisioningProvider
	StatusPollInterval   time.Duration
	MaxJobHistory        int
	// contains filtered or unexported fields
}

VirtualNetworkReconciler reconciles a VirtualNetwork object

func NewVirtualNetworkReconciler

func NewVirtualNetworkReconciler(
	mgr mcmanager.Manager,
	networkingNamespace string,
	provisioningProvider provisioning.ProvisioningProvider,
	statusPollInterval time.Duration,
	maxJobHistory int,
	targetCluster mc.ClusterName,
) *VirtualNetworkReconciler

NewVirtualNetworkReconciler creates a new reconciler for VirtualNetwork resources.

func (*VirtualNetworkReconciler) Reconcile

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 (*VirtualNetworkReconciler) SetupWithManager

func (r *VirtualNetworkReconciler) SetupWithManager(mgr mcmanager.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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