Skip to content

Commit f854be8

Browse files
authored
CLOUDP-355972: Cleanup CRD Comments (#2848)
1 parent 4f8d549 commit f854be8

37 files changed

+1038
-759
lines changed

api/v1/alert_configurations.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,10 @@ func (in *Matcher) IsEqual(matcher Matcher) bool {
130130
}
131131

132132
type Threshold struct {
133-
// Operator to apply when checking the current metric value against the threshold value. it accepts the following values: GREATER_THAN, LESS_THAN
133+
// Operator to apply when checking the current metric value against the threshold value.
134+
// It accepts the following values: GREATER_THAN, LESS_THAN.
134135
Operator string `json:"operator,omitempty"`
135-
// The units for the threshold value
136+
// The units for the threshold value.
136137
Units string `json:"units,omitempty"`
137138
// Threshold value outside which an alert will be triggered.
138139
Threshold string `json:"threshold,omitempty"`
@@ -199,7 +200,7 @@ type Notification struct {
199200
// Secret containing a Datadog API Key. Found in the Datadog dashboard. Populated for the DATADOG notifications type.
200201
// +optional
201202
DatadogAPIKeyRef common.ResourceRefNamespaced `json:"datadogAPIKeyRef,omitempty"`
202-
// Region that indicates which API URL to use
203+
// Region that indicates which API URL to use.
203204
DatadogRegion string `json:"datadogRegion,omitempty"`
204205
// Number of minutes to wait after an alert condition is detected before sending out the first notification.
205206
DelayMin *int `json:"delayMin,omitempty"`

api/v1/atlasbackupcompliancepolicy_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type AtlasBackupCompliancePolicySpec struct {
6363
// Flag that indicates whether Encryption at Rest using Customer Key Management is required for all clusters with a Backup Compliance Policy.
6464
// +kubebuilder:validation:default:=false
6565
EncryptionAtRestEnabled bool `json:"encryptionAtRestEnabled,omitempty"`
66-
// Flag that indicates whether to overwrite non complying backup policies with the new data protection settings or not.
66+
// Flag that indicates whether to overwrite non-complying backup policies with the new data protection settings or not.
6767
OverwriteBackupPolicies bool `json:"overwriteBackupPolicies,omitempty"`
6868
// Flag that indicates whether the cluster uses Continuous Cloud Backups with a Backup Compliance Policy.
6969
// +kubebuilder:validation:default:=false
@@ -77,12 +77,12 @@ type AtlasBackupCompliancePolicySpec struct {
7777
}
7878

7979
type AtlasOnDemandPolicy struct {
80-
// Scope of the backup policy item: days, weeks, or months
80+
// Scope of the backup policy item: days, weeks, or months.
8181
// +kubebuilder:validation:Enum:=days;weeks;months
8282
// +kubebuilder:validation:Required
8383
RetentionUnit string `json:"retentionUnit"`
8484

85-
// Value to associate with RetentionUnit
85+
// Value to associate with RetentionUnit.
8686
// +kubebuilder:validation:Required
8787
RetentionValue int `json:"retentionValue"`
8888
}

api/v1/atlasbackuppolicy_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323

2424
// AtlasBackupPolicySpec defines the desired state of AtlasBackupPolicy
2525
type AtlasBackupPolicySpec struct {
26-
// A list of BackupPolicy items
26+
// A list of BackupPolicy items.
2727
Items []AtlasBackupPolicyItem `json:"items"`
2828
}
2929

@@ -37,11 +37,11 @@ type AtlasBackupPolicyItem struct {
3737
// +kubebuilder:validation:Enum:=1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;40
3838
FrequencyInterval int `json:"frequencyInterval"`
3939

40-
// Scope of the backup policy item: days, weeks, or months
40+
// Scope of the backup policy item: days, weeks, or months.
4141
// +kubebuilder:validation:Enum:=days;weeks;months;years
4242
RetentionUnit string `json:"retentionUnit"`
4343

44-
// Value to associate with RetentionUnit
44+
// Value to associate with RetentionUnit.
4545
RetentionValue int `json:"retentionValue"`
4646
}
4747

api/v1/atlasbackupschedule_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ type AtlasBackupScheduleSpec struct {
7171
}
7272

7373
type AtlasBackupExportSpec struct {
74-
// Unique Atlas identifier of the AWS bucket which was granted access to export backup snapshot
74+
// Unique Atlas identifier of the AWS bucket which was granted access to export backup snapshot.
7575
ExportBucketID string `json:"exportBucketId"`
76+
// Human-readable label that indicates the rate at which the export policy item occurs.
7677
// +kubebuilder:validation:Enum:=monthly
7778
// +kubebuilder:default:=monthly
7879
FrequencyType string `json:"frequencyType"`

api/v1/atlascustomrole_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,6 @@ type AtlasCustomRoleList struct {
7272
type AtlasCustomRoleSpec struct {
7373
// ProjectReference is the dual external or kubernetes reference with access credentials
7474
ProjectDualReference `json:",inline"`
75-
Role CustomRole `json:"role"`
75+
// Role represents a Custom Role in Atlas.
76+
Role CustomRole `json:"role"`
7677
}

api/v1/atlasdatabaseuser_types.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const (
5252
// +kubebuilder:validation:XValidation:rule="(has(self.externalProjectRef) && !has(self.projectRef)) || (!has(self.externalProjectRef) && has(self.projectRef))",message="must define only one project reference through externalProjectRef or projectRef"
5353
// +kubebuilder:validation:XValidation:rule="(has(self.externalProjectRef) && has(self.connectionSecret)) || !has(self.externalProjectRef)",message="must define a local connection secret when referencing an external project"
5454
type AtlasDatabaseUserSpec struct {
55-
// ProjectReference is the dual external or kubernetes reference with access credentials
55+
// ProjectReference is the dual external or kubernetes reference with access credentials.
5656
ProjectDualReference `json:",inline"`
5757

5858
// DatabaseName is a Database against which Atlas authenticates the user.
@@ -89,7 +89,7 @@ type AtlasDatabaseUserSpec struct {
8989
// Human-readable label that represents the user that authenticates to MongoDB. The format of this label depends on the method of authentication:
9090
// In case of AWS IAM: the value should be AWS ARN for the IAM User/Role;
9191
// In case of OIDC Workload or Workforce: the value should be the Atlas OIDC IdP ID, followed by a '/', followed by the IdP group name;
92-
// In case of Plain text auth: the value can be anything
92+
// In case of Plain text auth: the value can be anything.
9393
// +kubebuilder:validation:MaxLength:=1024
9494
Username string `json:"username"`
9595

@@ -101,16 +101,14 @@ type AtlasDatabaseUserSpec struct {
101101
// +optional
102102
OIDCAuthType string `json:"oidcAuthType,omitempty"`
103103

104-
// Human-readable label that indicates whether the new database
105-
// user authenticates with the Amazon Web Services (AWS)
106-
// Identity and Access Management (IAM) credentials associated with
107-
// the user or the user's role
104+
// Human-readable label that indicates whether the new database user authenticates with Amazon Web Services (AWS).
105+
// Identity and Access Management (IAM) credentials associated with the user or the user's role
108106
// +kubebuilder:default:=NONE
109107
// +kubebuilder:validation:Enum:=NONE;USER;ROLE
110108
// +optional
111109
AWSIAMType string `json:"awsIamType,omitempty"`
112110

113-
// X509Type is X.509 method by which the database authenticates the provided username
111+
// X509Type is X.509 method by which the database authenticates the provided username.
114112
// +kubebuilder:default:=NONE
115113
// +kubebuilder:validation:Enum:=NONE;MANAGED;CUSTOMER
116114
// +optional

api/v1/atlasdatafederation_types.go

Lines changed: 93 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -29,92 +29,149 @@ func init() {
2929
}
3030

3131
type DataFederationSpec struct {
32-
// Project is a reference to AtlasProject resource the deployment belongs to
32+
// Project is a reference to AtlasProject resource the deployment belongs to.
3333
Project common.ResourceRefNamespaced `json:"projectRef"`
34-
Name string `json:"name"`
35-
34+
// Human-readable label that identifies the Federated Database Instance.
35+
Name string `json:"name"`
36+
// Configuration for the cloud provider where this Federated Database Instance is hosted.
3637
// +optional
3738
CloudProviderConfig *CloudProviderConfig `json:"cloudProviderConfig,omitempty"`
38-
39+
// Information about the cloud provider region to which the Federated Database Instance routes client connections.
3940
// +optional
4041
DataProcessRegion *DataProcessRegion `json:"dataProcessRegion,omitempty"`
41-
42+
// Configuration information for each data store and its mapping to MongoDB Atlas databases.
4243
// +optional
4344
Storage *Storage `json:"storage,omitempty"`
44-
45+
// Private endpoint for Federated Database Instances and Online Archives to add to the specified project.
4546
// +optional
4647
PrivateEndpoints []DataFederationPE `json:"privateEndpoints,omitempty"`
4748
}
4849

4950
type CloudProviderConfig struct {
51+
// Configuration for running Data Federation in AWS.
5052
AWS *AWSProviderConfig `json:"aws,omitempty"`
5153
}
5254

5355
type AWSProviderConfig struct {
54-
RoleID string `json:"roleId,omitempty"`
56+
// Unique identifier of the role that the data lake can use to access the data stores.Required if specifying cloudProviderConfig.
57+
RoleID string `json:"roleId,omitempty"`
58+
// Name of the S3 data bucket that the provided role ID is authorized to access.Required if specifying cloudProviderConfig.
5559
TestS3Bucket string `json:"testS3Bucket,omitempty"`
5660
}
5761

5862
type DataProcessRegion struct {
63+
// Name of the cloud service that hosts the Federated Database Instance's infrastructure.
5964
// +kubebuilder:validation:Enum:=AWS
6065
CloudProvider string `json:"cloudProvider,omitempty"`
66+
// Name of the region to which the data lake routes client connections.
6167
// +kubebuilder:validation:Enum:=SYDNEY_AUS;MUMBAI_IND;FRANKFURT_DEU;DUBLIN_IRL;LONDON_GBR;VIRGINIA_USA;OREGON_USA;SAOPAULO_BRA;SINGAPORE_SGP
6268
Region string `json:"region,omitempty"`
6369
}
6470

6571
type Storage struct {
72+
// Array that contains the queryable databases and collections for this data lake.
6673
Databases []Database `json:"databases,omitempty"`
67-
Stores []Store `json:"stores,omitempty"`
74+
// Array that contains the data stores for the data lake.
75+
Stores []Store `json:"stores,omitempty"`
6876
}
6977

78+
// Database associated with this data lake. Databases contain collections and views.
7079
type Database struct {
71-
Collections []Collection `json:"collections,omitempty"`
72-
MaxWildcardCollections int `json:"maxWildcardCollections,omitempty"`
73-
Name string `json:"name,omitempty"`
74-
Views []View `json:"views,omitempty"`
80+
// Array of collections and data sources that map to a stores data store.
81+
Collections []Collection `json:"collections,omitempty"`
82+
// Maximum number of wildcard collections in the database. This only applies to S3 data sources.
83+
// Minimum value is 1, maximum value is 1000. Default value is 100.
84+
MaxWildcardCollections int `json:"maxWildcardCollections,omitempty"`
85+
// Human-readable label that identifies the database to which the data lake maps data.
86+
Name string `json:"name,omitempty"`
87+
// Array of aggregation pipelines that apply to the collection. This only applies to S3 data sources.
88+
Views []View `json:"views,omitempty"`
7589
}
7690

91+
// Collection maps to a stores data store.
7792
type Collection struct {
93+
// Array that contains the data stores that map to a collection for this data lake.
7894
DataSources []DataSource `json:"dataSources,omitempty"`
79-
Name string `json:"name,omitempty"`
95+
// Human-readable label that identifies the collection to which MongoDB Atlas maps the data in the data stores.
96+
Name string `json:"name,omitempty"`
8097
}
8198

8299
type View struct {
83-
Name string `json:"name,omitempty"`
100+
// Human-readable label that identifies the view, which corresponds to an aggregation pipeline on a collection.
101+
Name string `json:"name,omitempty"`
102+
// Aggregation pipeline stages to apply to the source collection.
84103
Pipeline string `json:"pipeline,omitempty"`
85-
Source string `json:"source,omitempty"`
104+
// Human-readable label that identifies the source collection for the view.
105+
Source string `json:"source,omitempty"`
86106
}
87107

88108
type DataSource struct {
89-
AllowInsecure bool `json:"allowInsecure,omitempty"`
90-
Collection string `json:"collection,omitempty"`
109+
// Flag that validates the scheme in the specified URLs.
110+
// If true, allows insecure HTTP scheme, doesn't verify the server's certificate chain and hostname, and accepts any certificate with any hostname presented by the server.
111+
// If false, allows secure HTTPS scheme only.
112+
AllowInsecure bool `json:"allowInsecure,omitempty"`
113+
// Human-readable label that identifies the collection in the database. For creating a wildcard (*) collection, you must omit this parameter.
114+
Collection string `json:"collection,omitempty"`
115+
// Regex pattern to use for creating the wildcard (*) collection.
91116
CollectionRegex string `json:"collectionRegex,omitempty"`
92-
Database string `json:"database,omitempty"`
93-
DatabaseRegex string `json:"databaseRegex,omitempty"`
117+
// Human-readable label that identifies the database, which contains the collection in the cluster. You must omit this parameter to generate wildcard (*) collections for dynamically generated databases.
118+
Database string `json:"database,omitempty"`
119+
// Regex pattern to use for creating the wildcard (*) database.
120+
DatabaseRegex string `json:"databaseRegex,omitempty"`
121+
// File format that MongoDB Cloud uses if it encounters a file without a file extension while searching storeName.
94122
// +kubebuilder:validation:Enum:=.avro;.avro.bz2;.avro.gz;.bson;.bson.bz2;.bson.gz;.bsonx;.csv;.csv.bz2;.csv.gz;.json;.json.bz2;.json.gz;.orc;.parquet;.tsv;.tsv.bz2;.tsv.gz
95-
DefaultFormat string `json:"defaultFormat,omitempty"`
96-
Path string `json:"path,omitempty"`
97-
ProvenanceFieldName string `json:"provenanceFieldName,omitempty"`
98-
StoreName string `json:"storeName,omitempty"`
99-
Urls []string `json:"urls,omitempty"`
123+
DefaultFormat string `json:"defaultFormat,omitempty"`
124+
// File path that controls how MongoDB Cloud searches for and parses files in the storeName before mapping them to a collection.
125+
// Specify / to capture all files and folders from the prefix path.
126+
Path string `json:"path,omitempty"`
127+
// Name for the field that includes the provenance of the documents in the results. MongoDB Atlas returns different fields in the results for each supported provider.
128+
ProvenanceFieldName string `json:"provenanceFieldName,omitempty"`
129+
// Human-readable label that identifies the data store that MongoDB Cloud maps to the collection.
130+
StoreName string `json:"storeName,omitempty"`
131+
// URLs of the publicly accessible data files. You can't specify URLs that require authentication.
132+
// Atlas Data Lake creates a partition for each URL. If empty or omitted, Data Lake uses the URLs from the store specified in the storeName parameter.
133+
Urls []string `json:"urls,omitempty"`
100134
}
101135

136+
// Store is a group of settings that define where the data is stored.
102137
type Store struct {
103-
Name string `json:"name,omitempty"`
104-
Provider string `json:"provider,omitempty"`
138+
// Human-readable label that identifies the data store. The storeName field references this values as part of the mapping configuration.
139+
// To use MongoDB Atlas as a data store, the data lake requires a serverless instance or an M10 or higher cluster.
140+
Name string `json:"name,omitempty"`
141+
// The provider used for data stores.
142+
Provider string `json:"provider,omitempty"`
143+
// Collection of AWS S3 storage classes. Atlas Data Lake includes the files in these storage classes in the query results.
105144
AdditionalStorageClasses []string `json:"additionalStorageClasses,omitempty"`
106-
Bucket string `json:"bucket,omitempty"`
107-
Delimiter string `json:"delimiter,omitempty"`
108-
IncludeTags bool `json:"includeTags,omitempty"`
109-
Prefix string `json:"prefix,omitempty"`
110-
Public bool `json:"public,omitempty"`
111-
Region string `json:"region,omitempty"`
145+
// Human-readable label that identifies the AWS S3 bucket.
146+
// This label must exactly match the name of an S3 bucket that the data lake can access with the configured AWS Identity and Access Management (IAM) credentials.
147+
Bucket string `json:"bucket,omitempty"`
148+
// The delimiter that separates path segments in the data store.
149+
// MongoDB Atlas uses the delimiter to efficiently traverse S3 buckets with a hierarchical directory structure. You can specify any character supported by the S3 object keys as the delimiter.
150+
Delimiter string `json:"delimiter,omitempty"`
151+
// Flag that indicates whether to use S3 tags on the files in the given path as additional partition attributes.
152+
// If set to true, data lake adds the S3 tags as additional partition attributes and adds new top-level BSON elements associating each tag to each document.
153+
IncludeTags bool `json:"includeTags,omitempty"`
154+
// Prefix that MongoDB Cloud applies when searching for files in the S3 bucket.
155+
// The data store prepends the value of prefix to the path to create the full path for files to ingest.
156+
// If omitted, MongoDB Cloud searches all files from the root of the S3 bucket.
157+
Prefix string `json:"prefix,omitempty"`
158+
// Flag that indicates whether the bucket is public.
159+
// If set to true, MongoDB Cloud doesn't use the configured AWS Identity and Access Management (IAM) role to access the S3 bucket.
160+
// If set to false, the configured AWS IAM role must include permissions to access the S3 bucket.
161+
Public bool `json:"public,omitempty"`
162+
// Physical location where MongoDB Cloud deploys your AWS-hosted MongoDB cluster nodes. The region you choose can affect network latency for clients accessing your databases.
163+
// When MongoDB Atlas deploys a dedicated cluster, it checks if a VPC or VPC connection exists for that provider and region. If not, MongoDB Atlas creates them as part of the deployment.
164+
// To limit a new VPC peering connection to one CIDR block and region, create the connection first. Deploy the cluster after the connection starts.
165+
Region string `json:"region,omitempty"`
112166
}
113167

114168
type DataFederationPE struct {
169+
// Unique 22-character alphanumeric string that identifies the private endpoint.
115170
EndpointID string `json:"endpointId,omitempty"`
116-
Provider string `json:"provider,omitempty"`
117-
Type string `json:"type,omitempty"`
171+
// Human-readable label that identifies the cloud service provider. Atlas Data Lake supports Amazon Web Services only.
172+
Provider string `json:"provider,omitempty"`
173+
// Human-readable label that identifies the resource type associated with this private endpoint.
174+
Type string `json:"type,omitempty"`
118175
}
119176

120177
var _ api.AtlasCustomResource = &AtlasDataFederation{}
@@ -127,7 +184,7 @@ var _ api.AtlasCustomResource = &AtlasDataFederation{}
127184
// +groupName:=atlas.mongodb.com
128185
// +kubebuilder:resource:categories=atlas,shortName=adf
129186

130-
// AtlasDataFederation is the Schema for the Atlas Data Federation API
187+
// AtlasDataFederation is the Schema for the Atlas Data Federation API.
131188
type AtlasDataFederation struct {
132189
metav1.TypeMeta `json:",inline"`
133190
metav1.ObjectMeta `json:"metadata,omitempty"`
@@ -138,7 +195,7 @@ type AtlasDataFederation struct {
138195

139196
// +kubebuilder:object:root=true
140197

141-
// AtlasDataFederationList contains a list of AtlasDataFederationList
198+
// AtlasDataFederationList contains a list of AtlasDataFederationList.
142199
type AtlasDataFederationList struct {
143200
metav1.TypeMeta `json:",inline"`
144201
metav1.ListMeta `json:"metadata,omitempty"`

0 commit comments

Comments
 (0)