workflow

package
v2.10.1-prerelease2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRetry = time.Second * 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConditionReason

type ConditionReason string
const (
	Internal                      ConditionReason = "InternalError"
	AtlasResourceVersionMismatch  ConditionReason = "AtlasResourceVersionMismatch"
	AtlasResourceVersionIsInvalid ConditionReason = "AtlasResourceVersionIsInvalid"
	AtlasFinalizerNotSet          ConditionReason = "AtlasFinalizerNotSet"
	AtlasFinalizerNotRemoved      ConditionReason = "AtlasFinalizerNotRemoved"
	AtlasDeletionProtection       ConditionReason = "AtlasDeletionProtection"
	AtlasGovUnsupported           ConditionReason = "AtlasGovUnsupported"
	AtlasAPIAccessNotConfigured   ConditionReason = "AtlasAPIAccessNotConfigured"
	AtlasUnsupportedFeature       ConditionReason = "AtlasUnsupportedFeature"
)

General reasons

const (
	ProjectNotCreatedInAtlas                   ConditionReason = "ProjectNotCreatedInAtlas"
	ProjectBeingConfiguredInAtlas              ConditionReason = "ProjectBeingConfiguredInAtlas"
	ProjectIPAccessInvalid                     ConditionReason = "ProjectIPAccessListInvalid"
	ProjectIPNotCreatedInAtlas                 ConditionReason = "ProjectIPAccessListNotCreatedInAtlas"
	ProjectWindowInvalid                       ConditionReason = "ProjectWindowInvalid"
	ProjectWindowNotObtainedFromAtlas          ConditionReason = "ProjectWindowNotObtainedFromAtlas"
	ProjectWindowNotCreatedInAtlas             ConditionReason = "ProjectWindowNotCreatedInAtlas"
	ProjectWindowNotDeletedInAtlas             ConditionReason = "projectWindowNotDeletedInAtlas"
	ProjectWindowNotDeferredInAtlas            ConditionReason = "ProjectWindowNotDeferredInAtlas"
	ProjectWindowNotAutoDeferredInAtlas        ConditionReason = "ProjectWindowNotAutoDeferredInAtlas"
	ProjectPEServiceIsNotReadyInAtlas          ConditionReason = "ProjectPrivateEndpointServiceIsNotReadyInAtlas"
	ProjectPEInterfaceIsNotReadyInAtlas        ConditionReason = "ProjectPrivateEndpointIsNotReadyInAtlas"
	ProjectIPAccessListNotActive               ConditionReason = "ProjectIPAccessListNotActive"
	ProjectIntegrationInternal                 ConditionReason = "ProjectIntegrationInternalError"
	ProjectIntegrationRequest                  ConditionReason = "ProjectIntegrationRequestError"
	ProjectIntegrationReady                    ConditionReason = "ProjectIntegrationReady"
	ProjectPrivateEndpointIsNotReadyInAtlas    ConditionReason = "ProjectPrivateEndpointIsNotReadyInAtlas"
	ProjectNetworkPeerIsNotReadyInAtlas        ConditionReason = "ProjectNetworkPeerIsNotReadyInAtlas"
	ProjectEncryptionAtRestReady               ConditionReason = "ProjectEncryptionAtRestReady"
	ProjectCloudIntegrationsIsNotReadyInAtlas  ConditionReason = "ProjectCloudIntegrationsIsNotReadyInAtlas"
	ProjectAuditingReady                       ConditionReason = "ProjectAuditingReady"
	ProjectSettingsReady                       ConditionReason = "ProjectSettingsReady"
	ProjectAlertConfigurationIsNotReadyInAtlas ConditionReason = "ProjectAlertConfigurationIsNotReadyInAtlas"
	ProjectCustomRolesReady                    ConditionReason = "ProjectCustomRolesReady"
	ProjectTeamUnavailable                     ConditionReason = "ProjectTeamUnavailable"
	ProjectX509NotConfigured                   ConditionReason = "ProjectX509NotConfigured"
)

Atlas Project reasons

const (
	ProjectBackupCompliancePolicyNotMet            ConditionReason = "ProjectBackupCompliancePolicyNotMet"
	ProjectBackupCompliancePolicyNotCreatedInAtlas ConditionReason = "ProjectBackupCompliancePolicyNotCreatedInAtlas"
	ProjectBackupCompliancePolicyCannotDelete      ConditionReason = "ProjectBackupCompliancePolicyCannotDelete"
	ProjectBackupCompliancePolicyUpdating          ConditionReason = "ProjectBackupCompliancePolicyUpdating"
	ProjectBackupCompliancePolicyOperationAborted  ConditionReason = "ProjectBackupCompliancePolicyOperationAborted"
)

Atlas Backup Compliance Policy reasons

const (
	DeploymentNotCreatedInAtlas           ConditionReason = "DeploymentNotCreatedInAtlas"
	DeploymentNotUpdatedInAtlas           ConditionReason = "DeploymentNotUpdatedInAtlas"
	DeploymentCreating                    ConditionReason = "DeploymentCreating"
	DeploymentUpdating                    ConditionReason = "DeploymentUpdating"
	DeploymentConnectionSecretsNotCreated ConditionReason = "DeploymentConnectionSecretsNotCreated"
	DeploymentAdvancedOptionsReady        ConditionReason = "DeploymentAdvancedOptionsReady"
	DedicatedMigrationProgressing         ConditionReason = "DedicatedMigrationProgressing"
	DedicatedMigrationFailed              ConditionReason = "DedicatedMigrationFailed"
	ServerlessPrivateEndpointReady        ConditionReason = "ServerlessPrivateEndpointReady"
	ServerlessPrivateEndpointFailed       ConditionReason = "ServerlessPrivateEndpointFailed"
	ServerlessPrivateEndpointInProgress   ConditionReason = "ServerlessPrivateEndpointInProgress"
	ManagedNamespacesReady                ConditionReason = "ManagedNamespacesReady"
	CustomZoneMappingReady                ConditionReason = "CustomZoneMappingReady"
)

Atlas Deployment reasons

const (
	SearchNodesUpdating ConditionReason = "SearchNodesUpdating"
	SearchNodesCreating ConditionReason = "SearchNodesCreating"
	SearchNodesDeleting ConditionReason = "SearchNodesDeleting"

	ErrorSearchNodesNotUpsertedInAtlas ConditionReason = "SearchNodesNotUpsertedInAtlas"
	ErrorSearchNodesNotDeletedInAtlas  ConditionReason = "SearchNodesNotDeletedInAtlas"
	ErrorSearchNodesOperationAborted   ConditionReason = "SearchNodesOperationAborted"
)

Atlas SearchNodes reasons

const (
	DatabaseUserNotCreatedInAtlas           ConditionReason = "DatabaseUserNotCreatedInAtlas"
	DatabaseUserNotUpdatedInAtlas           ConditionReason = "DatabaseUserNotUpdatedInAtlas"
	DatabaseUserNotDeletedInAtlas           ConditionReason = "DatabaseUserNotDeletedInAtlas"
	DatabaseUserConnectionSecretsNotCreated ConditionReason = "DatabaseUserConnectionSecretsNotCreated"
	DatabaseUserConnectionSecretsNotDeleted ConditionReason = "DatabaseUserConnectionSecretsNotDeleted"
	DatabaseUserStaleConnectionSecrets      ConditionReason = "DatabaseUserStaleConnectionSecrets"
	DatabaseUserDeploymentAppliedChanges    ConditionReason = "DeploymentAppliedDatabaseUsersChanges"
	DatabaseUserInvalidSpec                 ConditionReason = "DatabaseUserInvalidSpec"
	DatabaseUserExpired                     ConditionReason = "DatabaseUserExpired"
)

Atlas Database User reasons

const (
	DataFederationNotCreatedInAtlas ConditionReason = "DataFederationNotCreatedInAtlas"
	DataFederationNotUpdatedInAtlas ConditionReason = "DataFederationNotUpdatedInAtlas"
	DataFederationCreating          ConditionReason = "DataFederationCreating"
	DataFederationUpdating          ConditionReason = "DataFederationUpdating"
)

Atlas Data Federation reasons

const (
	TeamNotCreatedInAtlas ConditionReason = "TeamNotCreatedInAtlas"
	TeamNotUpdatedInAtlas ConditionReason = "TeamNotUpdatedInAtlas"
	TeamInvalidSpec       ConditionReason = "TeamInvalidSpec"
	TeamUsersNotReady     ConditionReason = "TeamUsersNotReady"
	TeamDoesNotExist      ConditionReason = "TeamDoesNotExist"
	TeamNotCleaned        ConditionReason = "TeamCleanupFailed"
)

Atlas Teams reasons

const (
	FederatedAuthNotAvailable     ConditionReason = "FederatedAuthNotAvailable"
	FederatedAuthIsNotEnabledInCR ConditionReason = "FederatedAuthNotEnabledInCR"
	FederatedAuthOrgNotConnected  ConditionReason = "FederatedAuthOrgIsNotConnected"
	FederatedAuthUsersConflict    ConditionReason = "FederatedAuthUsersConflict"
)

Atlas Federated Auth reasons

const (
	StreamInstanceSetupInProgress ConditionReason = "StreamInstanceSetupInProgress"
	StreamInstanceNotCreated      ConditionReason = "StreamInstanceNotCreated"
	StreamInstanceNotRemoved      ConditionReason = "StreamInstanceNotRemoved"
	StreamInstanceNotUpdated      ConditionReason = "StreamInstanceNotUpdated"
	StreamConnectionNotConfigured ConditionReason = "StreamConnectionNotConfigured"
	StreamConnectionNotCreated    ConditionReason = "StreamConnectionNotCreated"
	StreamConnectionNotRemoved    ConditionReason = "StreamConnectionNotRemoved"
	StreamConnectionNotUpdated    ConditionReason = "StreamConnectionNotUpdated"
)

Atlas Streams reasons

const (
	AtlasCustomRoleNotCreated ConditionReason = "CustomRoleNotCreated"
	AtlasCustomRoleNotUpdated ConditionReason = "CustomRoleNotUpdated"
	AtlasCustomRoleNotDeleted ConditionReason = "CustomRoleNotDeleted"
)
const (
	PrivateEndpointServiceCreated           ConditionReason = "PrivateEndpointServiceCreated"
	PrivateEndpointServiceFailedToCreate    ConditionReason = "PrivateEndpointServiceFailedToCreate"
	PrivateEndpointServiceFailedToConfigure ConditionReason = "PrivateEndpointServiceFailedToConfigure"
	PrivateEndpointServiceInitializing      ConditionReason = "PrivateEndpointServiceInitializing"
	PrivateEndpointServiceDeleting          ConditionReason = "PrivateEndpointServiceDeleting"
	PrivateEndpointFailedToCreate           ConditionReason = "PrivateEndpointFailedToCreate"
	PrivateEndpointUpdating                 ConditionReason = "PrivateEndpointUpdating"
	PrivateEndpointConfigurationPending     ConditionReason = "PrivateEndpointConfigurationPending"
	PrivateEndpointFailedToConfigure        ConditionReason = "PrivateEndpointFailedToConfigure"
	PrivateEndpointFailedToDelete           ConditionReason = "PrivateEndpointFailedToDelete"
)

Atlas Private Endpoint reasons

const (
	IPAccessListFailedToCreate   ConditionReason = "IPAccessListFailedToCreate"
	IPAccessListFailedToDelete   ConditionReason = "IPAccessListFailedToDelete"
	IPAccessListFailedToGetState ConditionReason = "IPAccessListFailedToGetState"
	IPAccessListPending          ConditionReason = "IPAccessListPending"
)

Atlas IP Access List reasons

const (
	NetworkContainerNotConfigured ConditionReason = "NetworkContainerNotConfigured"
	NetworkContainerCreated       ConditionReason = "NetworkContainerCreated"
	NetworkContainerNotDeleted    ConditionReason = "NetworkContainerNotDeleted"
)

Atlas Network Container reasons

const (
	NetworkPeeringNotConfigured      ConditionReason = "NetworkPeeringNotConfigured"
	NetworkPeeringMissingContainer   ConditionReason = "NetworkPeeringMissingContainer"
	NetworkPeeringConnectionCreating ConditionReason = "NetworkPeeringConnectionCreating"
	NetworkPeeringConnectionUpdating ConditionReason = "NetworkPeeringConnectionUpdating"
	NetworkPeeringConnectionPending  ConditionReason = "NetworkPeeringConnectionPending"
	NetworkPeeringConnectionClosing  ConditionReason = "NetworkPeeringConnectionClosing"
)

Atlas Network Peering reasons

type Context

type Context struct {
	// Log is the root logger used in the reconciliation. Used just for convenience to avoid passing log to each
	// method.
	// Is not supposed to be mutated!
	Log *zap.SugaredLogger

	// OrgID is the identifier of the Organization which the Atlas client was configured for
	OrgID string

	SdkClientSet *atlas.ClientSet

	// Go context, when appropriate
	Context context.Context
	// contains filtered or unexported fields
}

Context is a container for some information that is needed on all levels of function calls during reconciliation. It's mutable by design. Note, that it's NOT a Go Context but can carry one

func NewContext

func NewContext(log *zap.SugaredLogger, conditions []api.Condition, context context.Context, obj runtime.Object) *Context

func (Context) Conditions

func (c Context) Conditions() []api.Condition

func (*Context) EnsureCondition

func (c *Context) EnsureCondition(condition api.Condition) *Context

func (*Context) EnsureStatusOption

func (c *Context) EnsureStatusOption(option api.Option) *Context

func (Context) GetCondition

func (c Context) GetCondition(conditionType api.ConditionType) (condition api.Condition, found bool)

func (*Context) HasReason

func (c *Context) HasReason(reason ConditionReason) bool

func (Context) LastCondition

func (c Context) LastCondition() *api.Condition

func (Context) LastConditionWarn

func (c Context) LastConditionWarn() bool

func (*Context) SetConditionFalse

func (c *Context) SetConditionFalse(conditionType api.ConditionType) *Context

func (*Context) SetConditionFalseMsg

func (c *Context) SetConditionFalseMsg(conditionType api.ConditionType, msg string) *Context

func (*Context) SetConditionFromResult

func (c *Context) SetConditionFromResult(conditionType api.ConditionType, result DeprecatedResult) *Context

func (*Context) SetConditionTrue

func (c *Context) SetConditionTrue(conditionType api.ConditionType) *Context

func (*Context) SetConditionTrueMsg

func (c *Context) SetConditionTrueMsg(conditionType api.ConditionType, msg string) *Context

func (Context) StatusOptions

func (c Context) StatusOptions() []api.Option

func (*Context) UnsetCondition

func (c *Context) UnsetCondition(conditionType api.ConditionType) *Context

type DeprecatedResult

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

Note: DeprecatedResult is a legacy type that is used to return the result of the reconciliation logic.

func Deleted

func Deleted() DeprecatedResult

func InProgress

func InProgress(reason ConditionReason, message string) DeprecatedResult

InProgress indicates that the reconciliation logic cannot proceed and needs to be finished (and possibly requeued). This is an expected termination of the reconciliation process so 'warning' flag is set to 'false'. 'reason' and 'message' indicate the in-progress state and are supposed to be reflected in the 'conditions' for the reconciled Custom Resource.

func OK

func OK() DeprecatedResult

OK indicates that the reconciliation logic can proceed further

func Requeue

func Requeue(period time.Duration) DeprecatedResult

func Terminate

func Terminate(reason ConditionReason, err error) DeprecatedResult

Terminate indicates that the reconciliation logic cannot proceed and needs to be finished (and possibly requeued). This is not an expected termination of the reconciliation process so 'warning' flag is set to 'true'. 'reason' and 'message' indicate the error state and are supposed to be reflected in the `conditions` for the reconciled Custom Resource.

func TerminateSilently

func TerminateSilently(err error) DeprecatedResult

TerminateSilently indicates that the reconciliation logic cannot proceed and needs to be finished (and possibly requeued) The status of the reconciled Custom Resource is not supposed to be updated.

func (DeprecatedResult) CloneWithoutError

func (r DeprecatedResult) CloneWithoutError() DeprecatedResult

func (DeprecatedResult) GetError

func (r DeprecatedResult) GetError() error

func (DeprecatedResult) GetMessage

func (r DeprecatedResult) GetMessage() string

func (DeprecatedResult) IsDeleted

func (r DeprecatedResult) IsDeleted() bool

func (DeprecatedResult) IsInProgress

func (r DeprecatedResult) IsInProgress() bool

func (DeprecatedResult) IsOk

func (r DeprecatedResult) IsOk() bool

func (DeprecatedResult) IsWarning

func (r DeprecatedResult) IsWarning() bool

func (DeprecatedResult) ReconcileResult

func (r DeprecatedResult) ReconcileResult() (reconcile.Result, error)

func (DeprecatedResult) WithMessage

func (r DeprecatedResult) WithMessage(message string) DeprecatedResult

func (DeprecatedResult) WithRetry

func (r DeprecatedResult) WithRetry(retry time.Duration) DeprecatedResult

func (DeprecatedResult) WithoutRetry

func (r DeprecatedResult) WithoutRetry() DeprecatedResult

WithoutRetry indicates that no retry must happen after the reconciliation is over. This should usually be used in cases when retry won't fix the situation like when the spec is incorrect and requires the user to update it.

type Status

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

Status is a mutable container containing the status of some particular reconciliation. It is expected to be updated by a controller and at any time it reflects the status of the reconciled resource. Its state should fully match the state of the resource so the information could be used to update the status field of the Custom Resource.

func NewStatus

func NewStatus(conditions []api.Condition) Status

func (*Status) EnsureCondition

func (s *Status) EnsureCondition(condition api.Condition)

func (*Status) EnsureOption

func (s *Status) EnsureOption(option api.Option)

func (*Status) GetCondition

func (s *Status) GetCondition(conditionType api.ConditionType) (condition api.Condition, found bool)

func (*Status) RemoveCondition

func (s *Status) RemoveCondition(conditionType api.ConditionType)

Jump to

Keyboard shortcuts

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