operations

package
v0.0.0-...-bdd5ccd Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOperationNodePoolCreateController

func NewOperationNodePoolCreateController(
	clock utilsclock.PassiveClock,
	resourcesDBClient corecosmosstorage.ResourcesDBClient,
	clusterServiceClient ocm.ClusterServiceClientSpec,
	notificationClient *http.Client,
	activeOperationInformer cache.SharedIndexInformer,
	backendInformers coreinformers.BackendInformers,
) controllerutils.Controller

NewOperationNodePoolCreateController returns a new Controller instance that follows an asynchronous node pool creation operation to completion and updates the corresponding operation document in Cosmos DB.

Operation documents relevant to this controller will have the following values:

ResourceType: Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools
     Request: Create
      Status: any non-terminal value

Note that "to completion" does not imply success. An operation is considered complete when its status field reaches what Azure defines as a terminal value; any of "Succeeded", "Failed", or "Canceled". Once the operation status reaches a terminal value, there will be no further updates to the operation document.

func NewOperationNodePoolDeleteController

func NewOperationNodePoolDeleteController(
	clock utilsclock.PassiveClock,
	resourcesDBClient corecosmosstorage.ResourcesDBClient,
	clusterServiceClient ocm.ClusterServiceClientSpec,
	notificationClient *http.Client,
	activeOperationInformer cache.SharedIndexInformer,
) controllerutils.Controller

NewOperationNodePoolDeleteController returns a new Controller instance that follows an asynchronous node pool deletion operation to completion and updates the corresponding operation document in Cosmos DB.

The controller has the following responsibilities:

  • While the NodePool Cosmos document is present, it reconciles the operation and the node pool status.
  • When the NodePool Cosmos document is deleted (by the nodePoolDeletionController), it marks the operation as Succeeded. It also cleans up child resources. TODO Note: This last part is handled by other controllers too but because the operationbase.SetDeleteOperationAsCompleted is still reused by other operations that have not been migrated to asynchronous flow yet this remains.

Note that "to completion" does not imply success. An operation is considered complete when its status field reaches what Azure defines as a terminal value; any of "Succeeded", "Failed", or "Canceled". Once the operation status reaches a terminal value, there will be no further updates to the operation document.

Operation documents relevant to this controller will have the following values:

ResourceType: Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools
     Request: Delete
      Status: any non-terminal value

func NewOperationNodePoolUpdateController

func NewOperationNodePoolUpdateController(
	clock utilsclock.PassiveClock,
	resourcesDBClient corecosmosstorage.ResourcesDBClient,
	clusterServiceClient ocm.ClusterServiceClientSpec,
	readDesireLister kubeapplierlisters.ReadDesireLister,
	notificationClient *http.Client,
	activeOperationInformer cache.SharedIndexInformer,
	backendInformers coreinformers.BackendInformers,
) controllerutils.Controller

NewOperationNodePoolUpdateController returns a new Controller instance that follows an asynchronous node pool update operation to completion and updates the corresponding operation document in Cosmos DB.

Operation documents relevant to this controller will have the following values:

ResourceType: Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools
     Request: Update
      Status: any non-terminal value

Note that "to completion" does not imply success. An operation is considered complete when its status field reaches what Azure defines as a terminal value; any of "Succeeded", "Failed", or "Canceled". Once the operation status reaches a terminal value, there will be no further updates to the operation document.

Types

This section is empty.

Jump to

Keyboard shortcuts

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