Skip to content

Commit 295b552

Browse files
committed
update deployment crd comments
1 parent c310bc4 commit 295b552

File tree

6 files changed

+282
-165
lines changed

6 files changed

+282
-165
lines changed

api/v1/atlasdeployment_types.go

Lines changed: 126 additions & 50 deletions
Large diffs are not rendered by default.

api/v1/atlassearchindex_types.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,59 +20,59 @@ import (
2020
"github.com/mongodb/mongodb-atlas-kubernetes/v2/api/v1/common"
2121
)
2222

23-
// SearchIndex is the CRD to configure part of the Atlas Search Index
23+
// SearchIndex is the CRD to configure part of the Atlas Search Index.
2424
type SearchIndex struct {
25-
// Human-readable label that identifies this index. Must be unique for a deployment
25+
// Human-readable label that identifies this index. Must be unique for a deployment.
2626
// +required
2727
Name string `json:"name"`
28-
// Human-readable label that identifies the database that contains the collection with one or more Atlas Search indexes
28+
// Human-readable label that identifies the database that contains the collection with one or more Atlas Search indexes.
2929
// +required
3030
DBName string `json:"DBName"`
31-
// Human-readable label that identifies the collection that contains one or more Atlas Search indexes
31+
// Human-readable label that identifies the collection that contains one or more Atlas Search indexes.
3232
// +required
3333
CollectionName string `json:"collectionName"`
34-
// Type of the index
34+
// Type of the index.
3535
// +kubebuilder:validation:Enum:=search;vectorSearch
3636
// +required
3737
Type string `json:"type,omitempty"`
38+
// Atlas search index configuration.
3839
// +optional
39-
// Atlas search index configuration
4040
Search *Search `json:"search,omitempty"`
41+
// Atlas vector search index configuration.
4142
// +optional
42-
// Atlas vector search index configuration
4343
VectorSearch *VectorSearch `json:"vectorSearch,omitempty"`
4444
}
4545

46-
// Search represents "search" type of Atlas Search Index
46+
// Search represents "search" type of Atlas Search Index.
4747
type Search struct {
48-
// Rule sets that map words to their synonyms in this index
48+
// Rule sets that map words to their synonyms in this index.
4949
// +optional
5050
Synonyms *[]Synonym `json:"synonyms,omitempty"`
51-
// Index specifications for the collection's fields
51+
// Index specifications for the collection's fields.
5252
// +required
5353
Mappings *Mappings `json:"mappings,omitempty"`
54+
// A reference to the AtlasSearchIndexConfig custom resource.
5455
// +required
55-
// A reference to the AtlasSearchIndexConfig custom resource
5656
SearchConfigurationRef common.ResourceRefNamespaced `json:"searchConfigurationRef"`
5757
}
5858

59-
// Synonym represents "Synonym" type of Atlas Search Index
59+
// Synonym represents "Synonym" type of Atlas Search Index.
6060
type Synonym struct {
61-
// Human-readable label that identifies the synonym definition. Each name must be unique within the same index definition
61+
// Human-readable label that identifies the synonym definition. Each name must be unique within the same index definition.
6262
// +required
6363
Name string `json:"name"`
64-
// Specific pre-defined method chosen to apply to the synonyms to be searched
64+
// Specific pre-defined method chosen to apply to the synonyms to be searched.
6565
// +kubebuilder:validation:Enum:=lucene.standard;lucene.simple;lucene.whitespace;lucene.keyword;lucene.arabic;lucene.armenian;lucene.basque;lucene.bengali;lucene.brazilian;lucene.bulgarian;lucene.catalan;lucene.chinese;lucene.cjk;lucene.czech;lucene.danish;lucene.dutch;lucene.english;lucene.finnish;lucene.french;lucene.galician;lucene.german;lucene.greek;lucene.hindi;lucene.hungarian;lucene.indonesian;lucene.irish;lucene.italian;lucene.japanese;lucene.korean;lucene.kuromoji;lucene.latvian;lucene.lithuanian;lucene.morfologik;lucene.nori;lucene.norwegian;lucene.persian;lucene.portuguese;lucene.romanian;lucene.russian;lucene.smartcn;lucene.sorani;lucene.spanish;lucene.swedish;lucene.thai;lucene.turkish;lucene.ukrainian
6666
// +required
6767
Analyzer string `json:"analyzer"`
68-
// Data set that stores the mapping one or more words map to one or more synonyms of those words
68+
// Data set that stores the mapping one or more words map to one or more synonyms of those words.
6969
// +required
7070
Source Source `json:"source"`
7171
}
7272

7373
// Source represents "Source" type of Atlas Search Index
7474
type Source struct {
75-
// Human-readable label that identifies the MongoDB collection that stores words and their applicable synonyms
75+
// Human-readable label that identifies the MongoDB collection that stores words and their applicable synonyms.
7676
Collection string `json:"collection"`
7777
}
7878

api/v1/common/common.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ func (rn ResourceRefNamespaced) Key() string {
4444

4545
// LabelSpec contains key-value pairs that tag and categorize the Cluster/DBUser
4646
type LabelSpec struct {
47+
// Key applied to tag and categorize this component.
4748
// +kubebuilder:validation:MaxLength:=255
48-
Key string `json:"key"`
49+
Key string `json:"key"`
50+
// Value set to the Key applied to tag and categorize this component.
4951
Value string `json:"value"`
5052
}
5153

api/v1/global_deployment.go

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,34 @@ import (
1919
)
2020

2121
type CustomZoneMapping struct {
22+
// Code that represents a location that maps to a zone in your global cluster.
23+
// MongoDB Atlas represents this location with a ISO 3166-2 location and subdivision codes when possible.
2224
Location string `json:"location"`
23-
Zone string `json:"zone"`
25+
// Human-readable label that identifies the zone in your global cluster. This zone maps to a location code.
26+
Zone string `json:"zone"`
2427
}
2528

2629
// ManagedNamespace represents the information about managed namespace configuration.
2730
type ManagedNamespace struct {
28-
Db string `json:"db"` // not changing this as is a breaking change
29-
Collection string `json:"collection"`
30-
CustomShardKey string `json:"customShardKey,omitempty"`
31-
NumInitialChunks int `json:"numInitialChunks,omitempty"`
32-
PresplitHashedZones *bool `json:"presplitHashedZones,omitempty"`
33-
IsCustomShardKeyHashed *bool `json:"isCustomShardKeyHashed,omitempty"` // Flag that specifies whether the custom shard key for the collection is hashed.
34-
IsShardKeyUnique *bool `json:"isShardKeyUnique,omitempty"` // Flag that specifies whether the underlying index enforces a unique constraint.
31+
// Human-readable label of the database to manage for this Global Cluster.
32+
Db string `json:"db"` // not changing this as is a breaking change
33+
// Human-readable label of the collection to manage for this Global Cluster.
34+
Collection string `json:"collection"`
35+
// Database parameter used to divide the collection into shards. Global clusters require a compound shard key.
36+
// This compound shard key combines the location parameter and the user-selected custom key.
37+
CustomShardKey string `json:"customShardKey,omitempty"`
38+
// Minimum number of chunks to create initially when sharding an empty collection with a hashed shard key.
39+
// Maximum value is 8192.
40+
NumInitialChunks int `json:"numInitialChunks,omitempty"`
41+
// Flag that indicates whether MongoDB Cloud should create and distribute initial chunks for an empty or non-existing collection.
42+
// MongoDB Cloud distributes data based on the defined zones and zone ranges for the collection.
43+
PresplitHashedZones *bool `json:"presplitHashedZones,omitempty"`
44+
// Flag that indicates whether someone hashed the custom shard key for the specified collection.
45+
// If you set this value to false, MongoDB Cloud uses ranged sharding.
46+
IsCustomShardKeyHashed *bool `json:"isCustomShardKeyHashed,omitempty"`
47+
// Flag that indicates whether someone hashed the custom shard key.
48+
// If this parameter returns false, this cluster uses ranged sharding.
49+
IsShardKeyUnique *bool `json:"isShardKeyUnique,omitempty"`
3550
}
3651

3752
func NewFailedToCreateManagedNamespaceStatus(namespace ManagedNamespace, err error) status.ManagedNamespace {

api/v1/serverless_private_endpoint.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
package v1
1616

17+
// ServerlessPrivateEndpoint configures private endpoints for the Serverless instances.
18+
// DEPRECATED: Serverless private endpoints are deprecated. See https://dochub.mongodb.org/core/atlas-flex-migration for details.
1719
type ServerlessPrivateEndpoint struct {
1820
// Name is the name of the Serverless PrivateLink Service. Should be unique.
1921
Name string `json:"name,omitempty"`

0 commit comments

Comments
 (0)