v1

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: Apache-2.0 Imports: 14 Imported by: 3

Documentation

Overview

Package v1 contains API Schema definitions for the mongodb.com v1 API group +kubebuilder:object:generate=true +groupName=mongodb.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "atlas.mongodb.com", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type AtlasCluster

type AtlasCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AtlasClusterSpec          `json:"spec,omitempty"`
	Status status.AtlasClusterStatus `json:"status,omitempty"`
}

AtlasCluster is the Schema for the atlasclusters API

func DefaultAWSCluster

func DefaultAWSCluster(namespace, projectName string) *AtlasCluster

func DefaultAzureCluster added in v0.5.0

func DefaultAzureCluster(namespace, projectName string) *AtlasCluster

func DefaultGCPCluster

func DefaultGCPCluster(namespace, projectName string) *AtlasCluster

func NewCluster

func NewCluster(namespace, name, nameInAtlas string) *AtlasCluster

func (AtlasCluster) AtlasProjectObjectKey

func (c AtlasCluster) AtlasProjectObjectKey() client.ObjectKey

func (*AtlasCluster) DeepCopy

func (in *AtlasCluster) DeepCopy() *AtlasCluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasCluster.

func (*AtlasCluster) DeepCopyInto

func (in *AtlasCluster) DeepCopyInto(out *AtlasCluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AtlasCluster) DeepCopyObject

func (in *AtlasCluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*AtlasCluster) GetStatus

func (c *AtlasCluster) GetStatus() status.Status

func (*AtlasCluster) Lightweight added in v0.6.1

func (c *AtlasCluster) Lightweight() *AtlasCluster

Lightweight makes the cluster work with small shared instance M2. This is useful for non-cluster tests (e.g. database users) and saves some money for the company.

func (*AtlasCluster) UpdateStatus

func (c *AtlasCluster) UpdateStatus(conditions []status.Condition, options ...status.Option)

func (*AtlasCluster) WithAtlasName

func (c *AtlasCluster) WithAtlasName(name string) *AtlasCluster

func (*AtlasCluster) WithBackingProvider added in v0.6.1

func (c *AtlasCluster) WithBackingProvider(name string) *AtlasCluster

func (*AtlasCluster) WithInstanceSize added in v0.6.1

func (c *AtlasCluster) WithInstanceSize(name string) *AtlasCluster

func (*AtlasCluster) WithName

func (c *AtlasCluster) WithName(name string) *AtlasCluster

func (*AtlasCluster) WithProjectName

func (c *AtlasCluster) WithProjectName(projectName string) *AtlasCluster

func (*AtlasCluster) WithProviderName

func (c *AtlasCluster) WithProviderName(name provider.ProviderName) *AtlasCluster

func (*AtlasCluster) WithRegionName

func (c *AtlasCluster) WithRegionName(name string) *AtlasCluster

type AtlasClusterList

type AtlasClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AtlasCluster `json:"items"`
}

AtlasClusterList contains a list of AtlasCluster

func (*AtlasClusterList) DeepCopy

func (in *AtlasClusterList) DeepCopy() *AtlasClusterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasClusterList.

func (*AtlasClusterList) DeepCopyInto

func (in *AtlasClusterList) DeepCopyInto(out *AtlasClusterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AtlasClusterList) DeepCopyObject

func (in *AtlasClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AtlasClusterSpec

type AtlasClusterSpec struct {
	// Project is a reference to AtlasProject resource the cluster belongs to
	Project ResourceRefNamespaced `json:"projectRef"`

	// Collection of settings that configures auto-scaling information for the cluster.
	// If you specify the autoScaling object, you must also specify the providerSettings.autoScaling object.
	// +optional
	AutoScaling *AutoScalingSpec `json:"autoScaling,omitempty"`

	// Configuration of BI Connector for Atlas on this cluster.
	// The MongoDB Connector for Business Intelligence for Atlas (BI Connector) is only available for M10 and larger clusters.
	// +optional
	BIConnector *BiConnectorSpec `json:"biConnector,omitempty"`

	// Type of the cluster that you want to create.
	// The parameter is required if replicationSpecs are set or if Global Clusters are deployed.
	// +kubebuilder:validation:Enum=REPLICASET;SHARDED;GEOSHARDED
	// +optional
	ClusterType ClusterType `json:"clusterType,omitempty"`

	// Capacity, in gigabytes, of the host's root volume.
	// Increase this number to add capacity, up to a maximum possible value of 4096 (i.e., 4 TB).
	// This value must be a positive integer.
	// The parameter is required if replicationSpecs are configured.
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=4096
	// +optional
	DiskSizeGB *int `json:"diskSizeGB,omitempty"` // TODO: may cause issues due to mongodb/go-client-mongodb-atlas#140

	// Cloud service provider that offers Encryption at Rest.
	// +kubebuilder:validation:Enum=AWS;GCP;AZURE;NONE
	// +optional
	EncryptionAtRestProvider string `json:"encryptionAtRestProvider,omitempty"`

	// Collection of key-value pairs that tag and categorize the cluster.
	// Each key and value has a maximum length of 255 characters.
	// +optional
	Labels []LabelSpec `json:"labels,omitempty"`

	// Version of the cluster to deploy.
	MongoDBMajorVersion string `json:"mongoDBMajorVersion,omitempty"`

	// Name of the cluster as it appears in Atlas. After Atlas creates the cluster, you can't change its name.
	Name string `json:"name"`

	// Positive integer that specifies the number of shards to deploy for a sharded cluster.
	// The parameter is required if replicationSpecs are configured
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=50
	// +optional
	NumShards *int `json:"numShards,omitempty"`

	// Flag that indicates whether the cluster should be paused.
	Paused *bool `json:"paused,omitempty"`

	// Flag that indicates the cluster uses continuous cloud backups.
	// +optional
	PitEnabled *bool `json:"pitEnabled,omitempty"`

	// Applicable only for M10+ clusters.
	// Flag that indicates if the cluster uses Cloud Backups for backups.
	// +optional
	ProviderBackupEnabled *bool `json:"providerBackupEnabled,omitempty"`

	// Configuration for the provisioned hosts on which MongoDB runs. The available options are specific to the cloud service provider.
	ProviderSettings *ProviderSettingsSpec `json:"providerSettings"`

	// Configuration for cluster regions.
	// +optional
	ReplicationSpecs []ReplicationSpec `json:"replicationSpecs,omitempty"`
}

AtlasClusterSpec defines the desired state of AtlasCluster

func (*AtlasClusterSpec) Cluster

func (spec *AtlasClusterSpec) Cluster() (*mongodbatlas.Cluster, error)

Cluster converts the Spec to native Atlas client format.

func (*AtlasClusterSpec) DeepCopy

func (in *AtlasClusterSpec) DeepCopy() *AtlasClusterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasClusterSpec.

func (*AtlasClusterSpec) DeepCopyInto

func (in *AtlasClusterSpec) DeepCopyInto(out *AtlasClusterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AtlasCustomResource

type AtlasCustomResource interface {
	metav1.Object
	runtime.Object
	status.Reader
	status.Writer
}

AtlasCustomResource is the interface common for all Atlas entities

type AtlasDatabaseUser

type AtlasDatabaseUser struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AtlasDatabaseUserSpec          `json:"spec,omitempty"`
	Status status.AtlasDatabaseUserStatus `json:"status,omitempty"`
}

AtlasDatabaseUser is the Schema for the Atlas Database User API

func DefaultDBUser

func DefaultDBUser(namespace, username, projectName string) *AtlasDatabaseUser

func NewDBUser

func NewDBUser(namespace, name, dbUserName, projectName string) *AtlasDatabaseUser

func (AtlasDatabaseUser) AtlasProjectObjectKey

func (p AtlasDatabaseUser) AtlasProjectObjectKey() client.ObjectKey

func (*AtlasDatabaseUser) ClearScopes added in v0.5.0

func (p *AtlasDatabaseUser) ClearScopes() *AtlasDatabaseUser

func (*AtlasDatabaseUser) DeepCopy

func (in *AtlasDatabaseUser) DeepCopy() *AtlasDatabaseUser

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasDatabaseUser.

func (*AtlasDatabaseUser) DeepCopyInto

func (in *AtlasDatabaseUser) DeepCopyInto(out *AtlasDatabaseUser)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AtlasDatabaseUser) DeepCopyObject

func (in *AtlasDatabaseUser) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (AtlasDatabaseUser) GetScopes

func (p AtlasDatabaseUser) GetScopes(scopeType ScopeType) []string

func (*AtlasDatabaseUser) GetStatus

func (p *AtlasDatabaseUser) GetStatus() status.Status

func (AtlasDatabaseUser) PasswordSecretObjectKey added in v0.5.0

func (p AtlasDatabaseUser) PasswordSecretObjectKey() *client.ObjectKey

func (*AtlasDatabaseUser) ReadPassword

func (p *AtlasDatabaseUser) ReadPassword(kubeClient client.Client) (string, error)

func (AtlasDatabaseUser) ToAtlas

func (p AtlasDatabaseUser) ToAtlas(kubeClient client.Client) (*mongodbatlas.DatabaseUser, error)

ToAtlas converts the AtlasDatabaseUser to native Atlas client format. Reads the password from the Secret

func (*AtlasDatabaseUser) UpdateStatus

func (p *AtlasDatabaseUser) UpdateStatus(conditions []status.Condition, options ...status.Option)

func (*AtlasDatabaseUser) WithAtlasUserName

func (p *AtlasDatabaseUser) WithAtlasUserName(name string) *AtlasDatabaseUser

func (*AtlasDatabaseUser) WithDeleteAfterDate added in v0.5.0

func (p *AtlasDatabaseUser) WithDeleteAfterDate(date string) *AtlasDatabaseUser

func (*AtlasDatabaseUser) WithName

func (p *AtlasDatabaseUser) WithName(name string) *AtlasDatabaseUser

func (*AtlasDatabaseUser) WithPasswordSecret

func (p *AtlasDatabaseUser) WithPasswordSecret(name string) *AtlasDatabaseUser

func (*AtlasDatabaseUser) WithRole

func (p *AtlasDatabaseUser) WithRole(roleName, databaseName, collectionName string) *AtlasDatabaseUser

func (*AtlasDatabaseUser) WithScope

func (p *AtlasDatabaseUser) WithScope(scopeType ScopeType, name string) *AtlasDatabaseUser

type AtlasDatabaseUserList

type AtlasDatabaseUserList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AtlasDatabaseUser `json:"items"`
}

AtlasDatabaseUserList contains a list of AtlasDatabaseUser

func (*AtlasDatabaseUserList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasDatabaseUserList.

func (*AtlasDatabaseUserList) DeepCopyInto

func (in *AtlasDatabaseUserList) DeepCopyInto(out *AtlasDatabaseUserList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AtlasDatabaseUserList) DeepCopyObject

func (in *AtlasDatabaseUserList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AtlasDatabaseUserSpec

type AtlasDatabaseUserSpec struct {
	// Project is a reference to AtlasProject resource the user belongs to
	Project ResourceRefNamespaced `json:"projectRef"`

	// DatabaseName is a Database against which Atlas authenticates the user. Default value is 'admin'.
	// +kubebuilder:default=admin
	DatabaseName string `json:"databaseName,omitempty"`

	// DeleteAfterDate is a timestamp in ISO 8601 date and time format in UTC after which Atlas deletes the user.
	// The specified date must be in the future and within one week.
	DeleteAfterDate string `json:"deleteAfterDate,omitempty"`

	// Labels is an array containing key-value pairs that tag and categorize the database user.
	// Each key and value has a maximum length of 255 characters.
	Labels []LabelSpec `json:"labels,omitempty"`

	// Roles is an array of this user's roles and the databases / collections on which the roles apply. A role allows
	// the user to perform particular actions on the specified database.
	// +kubebuilder:validation:MinItems=1
	Roles []RoleSpec `json:"roles"`

	// Scopes is an array of clusters and Atlas Data Lakes that this user has access to.
	Scopes []ScopeSpec `json:"scopes,omitempty"`

	// PasswordSecret is a reference to the Secret keeping the user password.
	PasswordSecret *ResourceRef `json:"passwordSecretRef"`

	// Username is a username for authenticating to MongoDB.
	Username string `json:"username"`
}

AtlasDatabaseUserSpec defines the desired state of Database User in Atlas

func (*AtlasDatabaseUserSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasDatabaseUserSpec.

func (*AtlasDatabaseUserSpec) DeepCopyInto

func (in *AtlasDatabaseUserSpec) DeepCopyInto(out *AtlasDatabaseUserSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AtlasProject

type AtlasProject struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AtlasProjectSpec          `json:"spec,omitempty"`
	Status status.AtlasProjectStatus `json:"status,omitempty"`
}

AtlasProject is the Schema for the atlasprojects API

func DefaultProject

func DefaultProject(namespace, connectionSecretName string) *AtlasProject

func NewProject

func NewProject(namespace, name, nameInAtlas string) *AtlasProject

func (*AtlasProject) ConnectionSecretObjectKey

func (p *AtlasProject) ConnectionSecretObjectKey() *client.ObjectKey

func (*AtlasProject) DeepCopy

func (in *AtlasProject) DeepCopy() *AtlasProject

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasProject.

func (*AtlasProject) DeepCopyInto

func (in *AtlasProject) DeepCopyInto(out *AtlasProject)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AtlasProject) DeepCopyObject

func (in *AtlasProject) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*AtlasProject) GetStatus

func (p *AtlasProject) GetStatus() status.Status

func (AtlasProject) ID

func (p AtlasProject) ID() string

ID is just a shortcut for ID from the status

func (*AtlasProject) UpdateStatus

func (p *AtlasProject) UpdateStatus(conditions []status.Condition, options ...status.Option)

func (*AtlasProject) WithAtlasName

func (p *AtlasProject) WithAtlasName(name string) *AtlasProject

func (*AtlasProject) WithConnectionSecret

func (p *AtlasProject) WithConnectionSecret(name string) *AtlasProject

func (*AtlasProject) WithIPAccessList

func (p *AtlasProject) WithIPAccessList(ipAccess project.IPAccessList) *AtlasProject

func (*AtlasProject) WithName

func (p *AtlasProject) WithName(name string) *AtlasProject

type AtlasProjectList

type AtlasProjectList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AtlasProject `json:"items"`
}

AtlasProjectList contains a list of AtlasProject

func (*AtlasProjectList) DeepCopy

func (in *AtlasProjectList) DeepCopy() *AtlasProjectList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasProjectList.

func (*AtlasProjectList) DeepCopyInto

func (in *AtlasProjectList) DeepCopyInto(out *AtlasProjectList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AtlasProjectList) DeepCopyObject

func (in *AtlasProjectList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AtlasProjectSpec

type AtlasProjectSpec struct {

	// Name is the name of the Project that is created in Atlas by the Operator if it doesn't exist yet.
	Name string `json:"name"`

	// ConnectionSecret is the name of the Kubernetes Secret which contains the information about the way to connect to
	// Atlas (organization ID, API keys). The default Operator connection configuration will be used if not provided.
	// +optional
	ConnectionSecret *ResourceRef `json:"connectionSecretRef,omitempty"`

	// ProjectIPAccessList allows to enable the IP Access List for the Project. See more information at
	// https://docs.atlas.mongodb.com/reference/api/ip-access-list/add-entries-to-access-list/
	// +optional
	ProjectIPAccessList []project.IPAccessList `json:"projectIpAccessList,omitempty"`

	// PrivateEndpoints is a list of Private Endpoints configured for the current Project.
	PrivateEndpoints []project.PrivateEndpoint `json:"privateEndpoints,omitempty"`
}

AtlasProjectSpec defines the desired state of Project in Atlas

func (*AtlasProjectSpec) DeepCopy

func (in *AtlasProjectSpec) DeepCopy() *AtlasProjectSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AtlasProjectSpec.

func (*AtlasProjectSpec) DeepCopyInto

func (in *AtlasProjectSpec) DeepCopyInto(out *AtlasProjectSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AutoScalingSpec

type AutoScalingSpec struct {
	// Flag that indicates whether autopilot mode for Performance Advisor is enabled.
	// The default is false.
	AutoIndexingEnabled *bool `json:"autoIndexingEnabled,omitempty"`
	// Flag that indicates whether disk auto-scaling is enabled. The default is true.
	// +optional
	DiskGBEnabled *bool `json:"diskGBEnabled,omitempty"`

	// Collection of settings that configure how a cluster might scale its cluster tier and whether the cluster can scale down.
	// +optional
	Compute *ComputeSpec `json:"compute,omitempty"`
}

AutoScalingSpec configures your cluster to automatically scale its storage

func (*AutoScalingSpec) DeepCopy

func (in *AutoScalingSpec) DeepCopy() *AutoScalingSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoScalingSpec.

func (*AutoScalingSpec) DeepCopyInto

func (in *AutoScalingSpec) DeepCopyInto(out *AutoScalingSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BiConnectorSpec

type BiConnectorSpec struct {
	// Flag that indicates whether or not BI Connector for Atlas is enabled on the cluster.
	// +optional
	Enabled *bool `json:"enabled,omitempty"`

	// Source from which the BI Connector for Atlas reads data. Each BI Connector for Atlas read preference contains a distinct combination of readPreference and readPreferenceTags options.
	// +optional
	ReadPreference string `json:"readPreference,omitempty"`
}

BiConnectorSpec specifies BI Connector for Atlas configuration on this cluster

func (*BiConnectorSpec) DeepCopy

func (in *BiConnectorSpec) DeepCopy() *BiConnectorSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BiConnectorSpec.

func (*BiConnectorSpec) DeepCopyInto

func (in *BiConnectorSpec) DeepCopyInto(out *BiConnectorSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterType

type ClusterType string
const (
	TypeReplicaSet ClusterType = "REPLICASET"
	TypeSharded    ClusterType = "SHARDED"
	TypeGeoSharded ClusterType = "GEOSHARDED"
)

type ComputeSpec

type ComputeSpec struct {
	// Flag that indicates whether cluster tier auto-scaling is enabled. The default is false.
	// +optional
	Enabled *bool `json:"enabled,omitempty"`

	// Flag that indicates whether the cluster tier may scale down. Atlas requires this parameter if "autoScaling.compute.enabled" : true.
	// +optional
	ScaleDownEnabled *bool `json:"scaleDownEnabled,omitempty"`

	// Minimum instance size to which your cluster can automatically scale (such as M10). Atlas requires this parameter if "autoScaling.compute.scaleDownEnabled" : true.
	// +optional
	MinInstanceSize string `json:"minInstanceSize,omitempty"`

	// Maximum instance size to which your cluster can automatically scale (such as M40). Atlas requires this parameter if "autoScaling.compute.enabled" : true.
	// +optional
	MaxInstanceSize string `json:"maxInstanceSize,omitempty"`
}

ComputeSpec Specifies whether the cluster automatically scales its cluster tier and whether the cluster can scale down.

func (*ComputeSpec) DeepCopy

func (in *ComputeSpec) DeepCopy() *ComputeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeSpec.

func (*ComputeSpec) DeepCopyInto

func (in *ComputeSpec) DeepCopyInto(out *ComputeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LabelSpec

type LabelSpec struct {
	// +kubebuilder:validation:MaxLength:=255
	Key   string `json:"key"`
	Value string `json:"value"`
}

LabelSpec contains key-value pairs that tag and categorize the Cluster/DBUser

func (*LabelSpec) DeepCopy

func (in *LabelSpec) DeepCopy() *LabelSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSpec.

func (*LabelSpec) DeepCopyInto

func (in *LabelSpec) DeepCopyInto(out *LabelSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProviderSettingsSpec

type ProviderSettingsSpec struct {
	// Cloud service provider on which the host for a multi-tenant cluster is provisioned.
	// This setting only works when "providerSetting.providerName" : "TENANT" and "providerSetting.instanceSizeName" : M2 or M5.
	// +kubebuilder:validation:Enum=AWS;GCP;AZURE
	// +optional
	BackingProviderName string `json:"backingProviderName,omitempty"`

	// Disk IOPS setting for AWS storage.
	// Set only if you selected AWS as your cloud service provider.
	// +optional
	DiskIOPS *int64 `json:"diskIOPS,omitempty"`

	// Type of disk if you selected Azure as your cloud service provider.
	// +optional
	DiskTypeName string `json:"diskTypeName,omitempty"`

	// Flag that indicates whether the Amazon EBS encryption feature encrypts the host's root volume for both data at rest within the volume and for data moving between the volume and the cluster.
	// +optional
	EncryptEBSVolume *bool `json:"encryptEBSVolume,omitempty"`

	// Atlas provides different cluster tiers, each with a default storage capacity and RAM size. The cluster you select is used for all the data-bearing hosts in your cluster tier.
	InstanceSizeName string `json:"instanceSizeName"`

	// Cloud service provider on which Atlas provisions the hosts.
	// +kubebuilder:validation:Enum=AWS;GCP;AZURE;TENANT
	ProviderName provider.ProviderName `json:"providerName"`

	// Physical location of your MongoDB cluster.
	// The region you choose can affect network latency for clients accessing your databases.
	// +optional
	RegionName string `json:"regionName,omitempty"`

	// Disk IOPS setting for AWS storage.
	// Set only if you selected AWS as your cloud service provider.
	// +kubebuilder:validation:Enum=STANDARD;PROVISIONED
	VolumeType string `json:"volumeType,omitempty"`

	// Range of instance sizes to which your cluster can scale.
	AutoScaling *AutoScalingSpec `json:"autoScaling,omitempty"`
}

ProviderSettingsSpec configuration for the provisioned servers on which MongoDB runs. The available options are specific to the cloud service provider.

func (*ProviderSettingsSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderSettingsSpec.

func (*ProviderSettingsSpec) DeepCopyInto

func (in *ProviderSettingsSpec) DeepCopyInto(out *ProviderSettingsSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RegionsConfig

type RegionsConfig struct {
	// The number of analytics nodes for Atlas to deploy to the region.
	// Analytics nodes are useful for handling analytic data such as reporting queries from BI Connector for Atlas.
	// Analytics nodes are read-only, and can never become the primary.
	// If you do not specify this option, no analytics nodes are deployed to the region.
	// +optional
	AnalyticsNodes *int64 `json:"analyticsNodes,omitempty"`

	// Number of electable nodes for Atlas to deploy to the region.
	// Electable nodes can become the primary and can facilitate local reads.
	// +optional
	ElectableNodes *int64 `json:"electableNodes,omitempty"`

	// Election priority of the region.
	// For regions with only replicationSpecs[n].regionsConfig.<region>.readOnlyNodes, set this value to 0.
	// +optional
	Priority *int64 `json:"priority,omitempty"`

	// Number of read-only nodes for Atlas to deploy to the region.
	// Read-only nodes can never become the primary, but can facilitate local-reads.
	// +optional
	ReadOnlyNodes *int64 `json:"readOnlyNodes,omitempty"`
}

RegionsConfig describes the region’s priority in elections and the number and type of MongoDB nodes Atlas deploys to the region.

func (*RegionsConfig) DeepCopy

func (in *RegionsConfig) DeepCopy() *RegionsConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegionsConfig.

func (*RegionsConfig) DeepCopyInto

func (in *RegionsConfig) DeepCopyInto(out *RegionsConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReplicationSpec

type ReplicationSpec struct {
	// Number of shards to deploy in each specified zone.
	// The default value is 1.
	NumShards *int64 `json:"numShards,omitempty"`

	// Name for the zone in a Global Cluster.
	// Don't provide this value if clusterType is not GEOSHARDED.
	// +optional
	ZoneName string `json:"zoneName,omitempty"`

	// Configuration for a region.
	// Each regionsConfig object describes the region's priority in elections and the number and type of MongoDB nodes that Atlas deploys to the region.
	// +optional
	RegionsConfig map[string]RegionsConfig `json:"regionsConfig,omitempty"`
}

ReplicationSpec represents a configuration for cluster regions

func (*ReplicationSpec) DeepCopy

func (in *ReplicationSpec) DeepCopy() *ReplicationSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationSpec.

func (*ReplicationSpec) DeepCopyInto

func (in *ReplicationSpec) DeepCopyInto(out *ReplicationSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceRef

type ResourceRef struct {
	// Name is the name of the Kubernetes Resource
	Name string `json:"name"`
}

ResourceRef is a reference to a Kubernetes Resource

func (*ResourceRef) DeepCopy

func (in *ResourceRef) DeepCopy() *ResourceRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRef.

func (*ResourceRef) DeepCopyInto

func (in *ResourceRef) DeepCopyInto(out *ResourceRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceRefNamespaced added in v0.6.1

type ResourceRefNamespaced struct {
	// Name is the name of the Kubernetes Resource
	Name string `json:"name"`

	// Namespace is the namespace of the Kubernetes Resource
	// +optional
	Namespace string `json:"namespace"`
}

ResourceRefNamespaced is a reference to a Kubernetes Resource that allows to configure the namespace

func (*ResourceRefNamespaced) DeepCopy added in v0.6.1

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRefNamespaced.

func (*ResourceRefNamespaced) DeepCopyInto added in v0.6.1

func (in *ResourceRefNamespaced) DeepCopyInto(out *ResourceRefNamespaced)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RoleSpec

type RoleSpec struct {
	// RoleName is a name of the role. This value can either be a built-in role or a custom role.
	RoleName string `json:"roleName"`

	// DatabaseName is a database on which the user has the specified role. A role on the admin database can include
	// privileges that apply to the other databases.
	DatabaseName string `json:"databaseName"`

	// CollectionName is a collection for which the role applies.
	CollectionName string `json:"collectionName,omitempty"`
}

RoleSpec allows the user to perform particular actions on the specified database. A role on the admin database can include privileges that apply to the other databases as well.

func (*RoleSpec) DeepCopy

func (in *RoleSpec) DeepCopy() *RoleSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleSpec.

func (*RoleSpec) DeepCopyInto

func (in *RoleSpec) DeepCopyInto(out *RoleSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ScopeSpec

type ScopeSpec struct {
	// Name is a name of the cluster or Atlas Data Lake that the user has access to.
	Name string `json:"name"`
	// Type is a type of resource that the user has access to.
	// +kubebuilder:validation:Enum=CLUSTER;DATA_LAKE
	Type ScopeType `json:"type"`
}

ScopeSpec if present a database user only have access to the indicated resource (Cluster or Atlas Data Lake) if none is given then it has access to all. It's highly recommended to restrict the access of the database users only to a limited set of resources.

func (*ScopeSpec) DeepCopy

func (in *ScopeSpec) DeepCopy() *ScopeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopeSpec.

func (*ScopeSpec) DeepCopyInto

func (in *ScopeSpec) DeepCopyInto(out *ScopeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ScopeType

type ScopeType string
const (
	ClusterScopeType  ScopeType = "CLUSTER"
	DataLakeScopeType ScopeType = "DATA_LAKE"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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