deployment

package
v2.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtlasDeploymentsService

type AtlasDeploymentsService interface {
	DeploymentService
	GlobalClusterService
}

type Cluster added in v2.5.0

type Cluster struct {
	*akov2.AdvancedDeploymentSpec
	ProjectID      string
	State          string
	MongoDBVersion string
	Connection     *status.ConnectionStrings
	ProcessArgs    *akov2.ProcessArgs
	ReplicaSet     []status.ReplicaSet
	// contains filtered or unexported fields
}

func ComputeChanges added in v2.5.0

func ComputeChanges(desired, current *Cluster) (*Cluster, bool)

func (*Cluster) Deprecated added in v2.7.0

func (c *Cluster) Deprecated() (bool, string)

func (*Cluster) GetConnection added in v2.5.0

func (c *Cluster) GetConnection() *status.ConnectionStrings

func (*Cluster) GetCustomResource added in v2.5.0

func (c *Cluster) GetCustomResource() *akov2.AtlasDeployment

func (*Cluster) GetMongoDBVersion added in v2.5.0

func (c *Cluster) GetMongoDBVersion() string

func (*Cluster) GetName added in v2.5.0

func (c *Cluster) GetName() string

func (*Cluster) GetProjectID added in v2.5.0

func (c *Cluster) GetProjectID() string

func (*Cluster) GetReplicaSet added in v2.5.0

func (c *Cluster) GetReplicaSet() []status.ReplicaSet

func (*Cluster) GetState added in v2.5.0

func (c *Cluster) GetState() string

func (*Cluster) IsFlex added in v2.7.0

func (c *Cluster) IsFlex() bool

func (*Cluster) IsServerless added in v2.5.0

func (c *Cluster) IsServerless() bool

func (*Cluster) IsTenant added in v2.5.0

func (c *Cluster) IsTenant() bool

type Connection

type Connection struct {
	Name             string
	ConnURL          string
	SrvConnURL       string
	PrivateURL       string
	SrvPrivateURL    string
	Serverless       bool
	PrivateEndpoints []PrivateEndpoint
}

type Deployment added in v2.5.0

type Deployment interface {
	GetName() string
	GetProjectID() string
	GetCustomResource() *akov2.AtlasDeployment
	GetState() string
	GetMongoDBVersion() string
	GetConnection() *status.ConnectionStrings
	GetReplicaSet() []status.ReplicaSet
	IsServerless() bool
	IsFlex() bool
	Deprecated() (bool, string)
}

func NewDeployment added in v2.5.0

func NewDeployment(projectID string, atlasDeployment *akov2.AtlasDeployment) Deployment

type DeploymentService added in v2.6.0

type DeploymentService interface {
	ListDeploymentNames(ctx context.Context, projectID string) ([]string, error)
	ListDeploymentConnections(ctx context.Context, projectID string) ([]Connection, error)
	ClusterExists(ctx context.Context, projectID, clusterName string) (bool, error)
	DeploymentIsReady(ctx context.Context, projectID, deploymentName string) (bool, error)

	GetDeployment(ctx context.Context, projectID string, deployment *akov2.AtlasDeployment) (Deployment, error)
	CreateDeployment(ctx context.Context, deployment Deployment) (Deployment, error)
	UpdateDeployment(ctx context.Context, deployment Deployment) (Deployment, error)
	DeleteDeployment(ctx context.Context, deployment Deployment) error
	ClusterWithProcessArgs(ctx context.Context, cluster *Cluster) error
	UpdateProcessArgs(ctx context.Context, cluster *Cluster) error
}

type Endpoint added in v2.5.0

type Endpoint struct {
	ID       string
	Provider string
	Region   string
}

type Flex added in v2.7.0

type Flex struct {
	*akov2.FlexSpec
	ProjectID      string
	State          string
	MongoDBVersion string
	Connection     *status.ConnectionStrings
	// contains filtered or unexported fields
}

func (*Flex) Deprecated added in v2.7.0

func (f *Flex) Deprecated() (bool, string)

func (*Flex) GetConnection added in v2.7.0

func (f *Flex) GetConnection() *status.ConnectionStrings

func (*Flex) GetCustomResource added in v2.7.0

func (f *Flex) GetCustomResource() *akov2.AtlasDeployment

func (*Flex) GetMongoDBVersion added in v2.7.0

func (f *Flex) GetMongoDBVersion() string

func (*Flex) GetName added in v2.7.0

func (f *Flex) GetName() string

func (*Flex) GetProjectID added in v2.7.0

func (f *Flex) GetProjectID() string

func (*Flex) GetReplicaSet added in v2.7.0

func (f *Flex) GetReplicaSet() []status.ReplicaSet

func (*Flex) GetState added in v2.7.0

func (f *Flex) GetState() string

func (*Flex) IsFlex added in v2.7.0

func (f *Flex) IsFlex() bool

func (*Flex) IsServerless added in v2.7.0

func (f *Flex) IsServerless() bool

type GlobalClusterService added in v2.6.0

type GlobalClusterService interface {
	GetCustomZones(ctx context.Context, projectID, clusterName string) (map[string]string, error)
	CreateCustomZones(ctx context.Context, projectID, clusterName string, mappings []akov2.CustomZoneMapping) (map[string]string, error)
	DeleteCustomZones(ctx context.Context, projectID, clusterName string) error
	GetZoneMapping(ctx context.Context, projectID, deploymentName string) (map[string]string, error)
	GetManagedNamespaces(ctx context.Context, projectID, clusterName string) ([]akov2.ManagedNamespace, error)
	CreateManagedNamespace(ctx context.Context, projectID, clusterName string, ns *akov2.ManagedNamespace) error
	DeleteManagedNamespace(ctx context.Context, projectID, clusterName string, ns *akov2.ManagedNamespace) error
}

type PrivateEndpoint

type PrivateEndpoint struct {
	URL       string
	ServerURL string
	ShardURL  string
	Endpoint  []Endpoint
}

type ProductionAtlasDeployments

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

func NewAtlasDeployments added in v2.5.0

func NewAtlasDeployments(clusterService admin.ClustersApi, serverlessAPI admin.ServerlessInstancesApi, globalClusterAPI admin.GlobalClustersApi, flexAPI adminv20241113001.FlexClustersApi, isGov bool) *ProductionAtlasDeployments

func NewAtlasDeploymentsService

func NewAtlasDeploymentsService(ctx context.Context, provider atlas.Provider, secretRef *types.NamespacedName, log *zap.SugaredLogger, isGov bool) (*ProductionAtlasDeployments, error)

func (*ProductionAtlasDeployments) ClusterExists

func (ds *ProductionAtlasDeployments) ClusterExists(ctx context.Context, projectID, name string) (bool, error)

func (*ProductionAtlasDeployments) ClusterWithProcessArgs added in v2.5.0

func (ds *ProductionAtlasDeployments) ClusterWithProcessArgs(ctx context.Context, cluster *Cluster) error

func (*ProductionAtlasDeployments) CreateCustomZones added in v2.6.0

func (ds *ProductionAtlasDeployments) CreateCustomZones(ctx context.Context, projectID, clusterName string, mappings []akov2.CustomZoneMapping) (map[string]string, error)

func (*ProductionAtlasDeployments) CreateDeployment added in v2.5.0

func (ds *ProductionAtlasDeployments) CreateDeployment(ctx context.Context, deployment Deployment) (Deployment, error)

func (*ProductionAtlasDeployments) CreateManagedNamespace added in v2.6.0

func (ds *ProductionAtlasDeployments) CreateManagedNamespace(ctx context.Context, projectID, clusterName string, ns *akov2.ManagedNamespace) error

func (*ProductionAtlasDeployments) DeleteCustomZones added in v2.6.0

func (ds *ProductionAtlasDeployments) DeleteCustomZones(ctx context.Context, projectID, clusterName string) error

func (*ProductionAtlasDeployments) DeleteDeployment added in v2.5.0

func (ds *ProductionAtlasDeployments) DeleteDeployment(ctx context.Context, deployment Deployment) error

func (*ProductionAtlasDeployments) DeleteManagedNamespace added in v2.6.0

func (ds *ProductionAtlasDeployments) DeleteManagedNamespace(ctx context.Context, projectID, clusterName string, namespace *akov2.ManagedNamespace) error

func (*ProductionAtlasDeployments) DeploymentIsReady

func (ds *ProductionAtlasDeployments) DeploymentIsReady(ctx context.Context, projectID, deploymentName string) (bool, error)

func (*ProductionAtlasDeployments) GetCluster added in v2.7.0

func (ds *ProductionAtlasDeployments) GetCluster(ctx context.Context, projectID, name string) (*Cluster, error)

func (*ProductionAtlasDeployments) GetCustomZones added in v2.6.0

func (ds *ProductionAtlasDeployments) GetCustomZones(ctx context.Context, projectID, clusterName string) (map[string]string, error)

func (*ProductionAtlasDeployments) GetDeployment added in v2.5.0

func (ds *ProductionAtlasDeployments) GetDeployment(ctx context.Context, projectID string, deployment *akov2.AtlasDeployment) (Deployment, error)

func (*ProductionAtlasDeployments) GetFlexCluster added in v2.7.0

func (ds *ProductionAtlasDeployments) GetFlexCluster(ctx context.Context, projectID, name string) (*Flex, error)

func (*ProductionAtlasDeployments) GetManagedNamespaces added in v2.6.0

func (ds *ProductionAtlasDeployments) GetManagedNamespaces(ctx context.Context, projectID, clusterName string) ([]akov2.ManagedNamespace, error)

func (*ProductionAtlasDeployments) GetServerless added in v2.7.0

func (ds *ProductionAtlasDeployments) GetServerless(ctx context.Context, projectID, name string) (*Serverless, error)

func (*ProductionAtlasDeployments) GetZoneMapping added in v2.6.0

func (ds *ProductionAtlasDeployments) GetZoneMapping(ctx context.Context, projectID, deploymentName string) (map[string]string, error)

func (*ProductionAtlasDeployments) ListDeploymentConnections

func (ds *ProductionAtlasDeployments) ListDeploymentConnections(ctx context.Context, projectID string) ([]Connection, error)

func (*ProductionAtlasDeployments) ListDeploymentNames added in v2.6.0

func (ds *ProductionAtlasDeployments) ListDeploymentNames(ctx context.Context, projectID string) ([]string, error)

func (*ProductionAtlasDeployments) UpdateDeployment added in v2.5.0

func (ds *ProductionAtlasDeployments) UpdateDeployment(ctx context.Context, deployment Deployment) (Deployment, error)

func (*ProductionAtlasDeployments) UpdateProcessArgs added in v2.5.0

func (ds *ProductionAtlasDeployments) UpdateProcessArgs(ctx context.Context, cluster *Cluster) error

type Serverless added in v2.5.0

type Serverless struct {
	*akov2.ServerlessSpec
	ProjectID      string
	State          string
	MongoDBVersion string
	Connection     *status.ConnectionStrings
	// contains filtered or unexported fields
}

func (*Serverless) Deprecated added in v2.7.0

func (s *Serverless) Deprecated() (bool, string)

func (*Serverless) GetConnection added in v2.5.0

func (s *Serverless) GetConnection() *status.ConnectionStrings

func (*Serverless) GetCustomResource added in v2.5.0

func (s *Serverless) GetCustomResource() *akov2.AtlasDeployment

func (*Serverless) GetMongoDBVersion added in v2.5.0

func (s *Serverless) GetMongoDBVersion() string

func (*Serverless) GetName added in v2.5.0

func (s *Serverless) GetName() string

func (*Serverless) GetProjectID added in v2.5.0

func (s *Serverless) GetProjectID() string

func (*Serverless) GetReplicaSet added in v2.5.0

func (s *Serverless) GetReplicaSet() []status.ReplicaSet

func (*Serverless) GetState added in v2.5.0

func (s *Serverless) GetState() string

func (*Serverless) IsFlex added in v2.7.0

func (s *Serverless) IsFlex() bool

func (*Serverless) IsServerless added in v2.5.0

func (s *Serverless) IsServerless() bool

Jump to

Keyboard shortcuts

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