Documentation
¶
Index ¶
- Constants
- func AdvancedDeploymentFromAtlas(advancedDeployment mongodbatlas.AdvancedCluster) (akov2.AdvancedDeploymentSpec, error)
- func AdvancedDeploymentsEqual(log *zap.SugaredLogger, deploymentOperator *akov2.AdvancedDeploymentSpec, ...) (areEqual bool, diff string)
- func EnsureCustomZoneMapping(service *workflow.Context, groupID string, ...) workflow.Result
- func EnsureManagedNamespaces(service *workflow.Context, groupID string, clusterType string, ...) workflow.Result
- func GetAllDeploymentNames(ctx context.Context, client *mongodbatlas.Client, projectID string) ([]string, error)
- func GetGlobalDeploymentState(ctx context.Context, client mongodbatlas.GlobalClustersService, groupID string, ...) ([]mongodbatlas.ManagedNamespace, map[string]string, error)
- func IsFreeTierAdvancedDeployment(deployment *mongodbatlas.AdvancedCluster) bool
- func MergedAdvancedDeployment(atlasDeploymentAsAtlas mongodbatlas.AdvancedCluster, ...) (mergedDeployment akov2.AdvancedDeploymentSpec, ...)
- type AtlasDeploymentReconciler
- type NamespaceDiff
Constants ¶
View Source
const ( Unset atlasClusterType = iota Advanced Serverless )
View Source
const ( SPEStatusDeleting = "DELETING" SPEStatusReserved = "RESERVED" SPEStatusAvailable = "AVAILABLE" )
Status transitions: RESERVATION_REQUESTED -> RESERVED -> INITIATING -> AVAILABLE -> DELETING I assume FAILED state can be reach from any other state transition
View Source
const FreeTier = "M0"
Variables ¶
This section is empty.
Functions ¶
func AdvancedDeploymentFromAtlas ¶
func AdvancedDeploymentFromAtlas(advancedDeployment mongodbatlas.AdvancedCluster) (akov2.AdvancedDeploymentSpec, error)
func AdvancedDeploymentsEqual ¶
func AdvancedDeploymentsEqual(log *zap.SugaredLogger, deploymentOperator *akov2.AdvancedDeploymentSpec, deploymentAtlas *akov2.AdvancedDeploymentSpec) (areEqual bool, diff string)
AdvancedDeploymentsEqual compares two Atlas Advanced Deployments
func EnsureCustomZoneMapping ¶
func EnsureManagedNamespaces ¶
func GetAllDeploymentNames ¶
func GetAllDeploymentNames(ctx context.Context, client *mongodbatlas.Client, projectID string) ([]string, error)
GetAllDeploymentNames returns all deployment names including regular and advanced deployment.
func GetGlobalDeploymentState ¶
func GetGlobalDeploymentState(ctx context.Context, client mongodbatlas.GlobalClustersService, groupID string, deploymentName string) ([]mongodbatlas.ManagedNamespace, map[string]string, error)
func IsFreeTierAdvancedDeployment ¶
func IsFreeTierAdvancedDeployment(deployment *mongodbatlas.AdvancedCluster) bool
func MergedAdvancedDeployment ¶
func MergedAdvancedDeployment(atlasDeploymentAsAtlas mongodbatlas.AdvancedCluster, specDeployment akov2.AdvancedDeploymentSpec) (mergedDeployment akov2.AdvancedDeploymentSpec, atlasDeployment akov2.AdvancedDeploymentSpec, err error)
MergedAdvancedDeployment will return the result of merging AtlasDeploymentSpec with Atlas Advanced Deployment
Types ¶
type AtlasDeploymentReconciler ¶
type AtlasDeploymentReconciler struct {
watch.ResourceWatcher
Client client.Client
Log *zap.SugaredLogger
Scheme *runtime.Scheme
GlobalPredicates []predicate.Predicate
EventRecorder record.EventRecorder
AtlasProvider atlas.Provider
ObjectDeletionProtection bool
SubObjectDeletionProtection bool
}
AtlasDeploymentReconciler reconciles an AtlasDeployment object
func (*AtlasDeploymentReconciler) SetupWithManager ¶
func (r *AtlasDeploymentReconciler) SetupWithManager(mgr ctrl.Manager) error
type NamespaceDiff ¶
type NamespaceDiff struct {
ToCreate []mongodbatlas.ManagedNamespace
ToDelete []mongodbatlas.ManagedNamespace
ToUpdateStatus []mongodbatlas.ManagedNamespace
}
Click to show internal directories.
Click to hide internal directories.