Documentation ¶
Overview ¶
Package topology implements the managed topology controller. NOTE: It is required to enable the ClusterTopology feature gate flag to activate managed topologies support; this feature is highly experimental, and parts of it might still be not implemented.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterReconciler ¶
type ClusterReconciler struct { Client client.Client WatchFilterValue string // UnstructuredCachingClient provides a client that forces caching of unstructured objects, // thus allowing to optimize reads for templates or provider specific objects in a managed topology. UnstructuredCachingClient client.Client // contains filtered or unexported fields }
ClusterReconciler reconciles a managed topology for a Cluster object.
func (*ClusterReconciler) SetupWithManager ¶
func (r *ClusterReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error
type MachineDeploymentReconciler ¶ added in v0.4.3
type MachineDeploymentReconciler struct { Client client.Client // APIReader is used to list MachineSets directly via the API server to avoid // race conditions caused by an outdated cache. APIReader client.Reader WatchFilterValue string }
MachineDeploymentReconciler deletes referenced templates during deletion of topology-owned MachineDeployments. The templates are only deleted, if they are not used in other MachineDeployments or MachineSets which are not in deleting state, i.e. the templates would otherwise be orphaned after the MachineDeployment deletion completes. Note: To achieve this the cluster topology controller sets a finalizer to hook into the MachineDeployment deletions.
func (*MachineDeploymentReconciler) Reconcile ¶ added in v0.4.3
func (r *MachineDeploymentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile deletes referenced templates during deletion of topology-owned MachineDeployments. The templates are only deleted, if they are not used in other MachineDeployments or MachineSets which are not in deleting state, i.e. the templates would otherwise be orphaned after the MachineDeployment deletion completes. Additional context: * MachineDeployment deletion:
- MachineDeployments are deleted and garbage collected first (without waiting until all MachineSets are also deleted).
- After that, deletion of MachineSets is automatically triggered by Kubernetes based on owner references.
Note: We assume templates are not reused by different MachineDeployments, which is only true for topology-owned
MachineDeployments.
We don't have to set the finalizer, as it's already set during MachineDeployment creation in the cluster topology controller.
func (*MachineDeploymentReconciler) SetupWithManager ¶ added in v0.4.3
func (r *MachineDeploymentReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error
type MachineSetReconciler ¶ added in v0.4.3
type MachineSetReconciler struct { Client client.Client // APIReader is used to list MachineSets directly via the API server to avoid // race conditions caused by an outdated cache. APIReader client.Reader WatchFilterValue string }
MachineSetReconciler deletes referenced templates during deletion of topology-owned MachineSets. The templates are only deleted, if they are not used in other MachineDeployments or MachineSets which are not in deleting state, i.e. the templates would otherwise be orphaned after the MachineSet deletion completes. Note: To achieve this the reconciler sets a finalizer to hook into the MachineSet deletions.
func (*MachineSetReconciler) Reconcile ¶ added in v0.4.3
func (r *MachineSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile deletes referenced templates during deletion of topology-owned MachineSets. The templates are only deleted, if they are not used in other MachineDeployments or MachineSets which are not in deleting state, i.e. the templates would otherwise be orphaned after the MachineSet deletion completes. Additional context: * MachineSet deletion:
- MachineSets are deleted and garbage collected first (without waiting until all Machines are also deleted)
- After that, deletion of Machines is automatically triggered by Kubernetes based on owner references.
Note: We assume templates are not reused by different MachineDeployments, which is (only) true for topology-owned
MachineDeployments.
We don't have to set the finalizer, as it's already set during MachineSet creation in the MachineSet controller.
func (*MachineSetReconciler) SetupWithManager ¶ added in v0.4.3
func (r *MachineSetReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
check
Package check implements checks for managed topology.
|
Package check implements checks for managed topology. |
contract
Package contract provides support for the ClusterReconciler to handle with providers objects according to the Cluster API contract.
|
Package contract provides support for the ClusterReconciler to handle with providers objects according to the Cluster API contract. |
log
Package log provides log utilities for the topology package.
|
Package log provides log utilities for the topology package. |
mergepatch
Package mergepatch implements merge patch support for managed topology.
|
Package mergepatch implements merge patch support for managed topology. |
scope
Package scope provides types for handling all the information to process a request in the topology/ClusterReconciler controller.
|
Package scope provides types for handling all the information to process a request in the topology/ClusterReconciler controller. |