Skip to content

Commit a04ffe7

Browse files
authored
CLOUDP-355972: Further CRD Comment Fixes (#2924)
1 parent ca5760b commit a04ffe7

10 files changed

+154
-133
lines changed

api/condition.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ type Condition struct {
137137
// Status of the condition, one of True, False, Unknown.
138138
Status corev1.ConditionStatus `json:"status"`
139139
// Last time the condition transitioned from one status to another.
140+
// Represented in ISO 8601 format.
140141
// +optional
141142
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
142143
// The reason for the condition's last transition.

api/v1/atlasbackuppolicy_types.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type AtlasBackupPolicySpec struct {
2828
}
2929

3030
type AtlasBackupPolicyItem struct {
31-
// Frequency associated with the backup policy item. One of the following values: hourly, daily, weekly or monthly. You cannot specify multiple hourly and daily backup policy items.
31+
// Frequency associated with the backup policy item. You cannot specify multiple hourly and daily backup policy items.
3232
// +kubebuilder:validation:Enum:=hourly;daily;weekly;monthly;yearly
3333
FrequencyType string `json:"frequencyType"`
3434

@@ -37,11 +37,12 @@ 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+
// Unit of time in which MongoDB Atlas measures snapshot retention.
4141
// +kubebuilder:validation:Enum:=days;weeks;months;years
4242
RetentionUnit string `json:"retentionUnit"`
4343

44-
// Value to associate with RetentionUnit.
44+
// Duration in days, weeks, months, or years that MongoDB Cloud retains the snapshot.
45+
// For less frequent policy items, MongoDB Cloud requires that you specify a value greater than or equal to the value specified for more frequent policy items.
4546
RetentionValue int `json:"retentionValue"`
4647
}
4748

api/v1/atlasbackupschedule_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"github.com/mongodb/mongodb-atlas-kubernetes/v2/internal/pointer"
2727
)
2828

29-
// AtlasBackupScheduleSpec defines the desired state of AtlasBackupSchedule
29+
// AtlasBackupScheduleSpec defines the desired state of AtlasBackupSchedule.
3030
type AtlasBackupScheduleSpec struct {
3131
// Specify true to enable automatic export of cloud backup snapshots to the AWS bucket. You must also define the export policy using export. If omitted, defaults to false.
3232
// +optional
@@ -100,7 +100,7 @@ var _ api.AtlasCustomResource = &AtlasBackupSchedule{}
100100
// +kubebuilder:resource:categories=atlas,shortName=abs
101101
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status`
102102
//
103-
// AtlasBackupSchedule is the Schema for the atlasbackupschedules API
103+
// AtlasBackupSchedule is the Schema for the atlasbackupschedules API.
104104
type AtlasBackupSchedule struct {
105105
metav1.TypeMeta `json:",inline"`
106106
metav1.ObjectMeta `json:"metadata,omitempty"`

api/v1/atlascustomrole_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ type AtlasCustomRoleList struct {
6666
Items []AtlasCustomRole `json:"items"`
6767
}
6868

69-
// AtlasCustomRoleSpec defines the desired state of CustomRole in Atlas
69+
// AtlasCustomRoleSpec defines the desired state of CustomRole in Atlas.
7070
// +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"
7171
// +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"
7272
type AtlasCustomRoleSpec struct {
73-
// ProjectReference is the dual external or kubernetes reference with access credentials
73+
// ProjectReference is the dual external or kubernetes reference with access credentials.
7474
ProjectDualReference `json:",inline"`
7575
// Role represents a Custom Role in Atlas.
7676
Role CustomRole `json:"role"`

api/v1/atlasfederatedauth_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ type RoleAssignment struct {
129129
// The Atlas project in the same org in which the role should be given.
130130
ProjectName string `json:"projectName,omitempty"`
131131
// The role in Atlas that should be given to group members.
132-
// +kubebuilder:validation:Enum=ORG_MEMBER;ORG_READ_ONLY;ORG_BILLING_ADMIN;ORG_GROUP_CREATOR;ORG_OWNER;ORG_BILLING_READ_ONLY;ORG_TEAM_MEMBERS_ADMIN;GROUP_AUTOMATION_ADMIN;GROUP_BACKUP_ADMIN;GROUP_MONITORING_ADMIN;GROUP_OWNER;GROUP_READ_ONLY;GROUP_USER_ADMIN;GROUP_BILLING_ADMIN;GROUP_DATA_ACCESS_ADMIN;GROUP_DATA_ACCESS_READ_ONLY;GROUP_DATA_ACCESS_READ_WRITE;GROUP_CHARTS_ADMIN;GROUP_CLUSTER_MANAGER;GROUP_SEARCH_INDEX_EDITOR
132+
// +kubebuilder:validation:Enum=ORG_MEMBER;ORG_READ_ONLY;ORG_BILLING_ADMIN;ORG_GROUP_CREATOR;ORG_OWNER;ORG_BILLING_READ_ONLY;ORG_TEAM_MEMBERS_ADMIN;GROUP_AUTOMATION_ADMIN;GROUP_BACKUP_ADMIN;GROUP_MONITORING_ADMIN;GROUP_OWNER;GROUP_READ_ONLY;GROUP_USER_ADMIN;GROUP_BILLING_ADMIN;GROUP_DATA_ACCESS_ADMIN;GROUP_DATA_ACCESS_READ_ONLY;GROUP_DATA_ACCESS_READ_WRITE;GROUP_CHARTS_ADMIN;GROUP_CLUSTER_MANAGER;GROUP_SEARCH_INDEX_EDITOR;GROUP_DATABASE_ACCESS_ADMIN;GROUP_BACKUP_MANAGER;GROUP_STREAM_PROCESSING_OWNER;ORG_STREAM_PROCESSING_ADMIN;GROUP_OBSERVABILITY_VIEWER
133133
Role string `json:"role,omitempty"`
134134
}
135135

api/v1/atlasnetworkcontainer_types.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ type AtlasNetworkContainerList struct {
5858
// +kubebuilder:validation:XValidation:rule="(self.id == oldSelf.id) || (!has(self.id) && !has(oldSelf.id))",message="id is immutable"
5959
// +kubebuilder:validation:XValidation:rule="(self.region == oldSelf.region) || (!has(self.region) && !has(oldSelf.region))",message="region is immutable"
6060

61-
// AtlasNetworkContainerSpec defines the desired state of an AtlasNetworkContainer
61+
// AtlasNetworkContainerSpec defines the desired state of an AtlasNetworkContainer.
6262
type AtlasNetworkContainerSpec struct {
6363
ProjectDualReference `json:",inline"`
6464

@@ -67,10 +67,11 @@ type AtlasNetworkContainerSpec struct {
6767
// +kubebuilder:validation:Required
6868
Provider string `json:"provider"`
6969

70+
// Collection of settings that configures the network container for a virtual private connection in a cloud provider.
7071
AtlasNetworkContainerConfig `json:",inline"`
7172
}
7273

73-
// AtlasNetworkContainerConfig defines the Atlas specifics of the desired state of a Network Container
74+
// AtlasNetworkContainerConfig defines the Atlas specifics of the desired state of a Network Container.
7475
type AtlasNetworkContainerConfig struct {
7576
// ID is the container identifier for an already existent network container to be managed by the operator.
7677
// This field can be used in conjunction with cidrBlock to update the cidrBlock of an existing container.

api/v1/atlasstreamconnection_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ type ClusterConnectionConfig struct {
4444
type StreamsClusterDBRole struct {
4545
// The name of the role to use. Can be a built-in role or a custom role.
4646
Name string `json:"name"`
47-
// Type of the DB role. Can be either BuiltIn or Custom.
47+
// Type of the DB role. Can be either BUILT_IN or CUSTOM.
4848
// +kubebuilder:validation:Enum:=BUILT_IN;CUSTOM
4949
RoleType string `json:"type"`
5050
}

api/v1/projectref.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,17 @@ import (
1919
"github.com/mongodb/mongodb-atlas-kubernetes/v2/api/v1/common"
2020
)
2121

22-
// ProjectDualReference encapsulates together the frequnet construct to refer to
23-
// a parent projet by a Kubernetes references, or an external ID, which also
24-
// reqwuires access credentials in such case
22+
// ProjectDualReference encapsulates the common constructs to refer to a parent project;
23+
// by either a Kubernetes reference or an external ID, which also requires access credentials.
2524
type ProjectDualReference struct {
26-
// "projectRef" is a reference to the parent AtlasProject resource.
27-
// Mutually exclusive with the "externalProjectRef" field
25+
// projectRef is a reference to the parent AtlasProject resource.
26+
// Mutually exclusive with the "externalProjectRef" field.
2827
// +kubebuilder:validation:Optional
2928
ProjectRef *common.ResourceRefNamespaced `json:"projectRef,omitempty"`
30-
// "externalProjectRef" holds the parent Atlas project ID.
31-
// Mutually exclusive with the "projectRef" field
29+
// externalProjectRef holds the parent Atlas project ID.
30+
// Mutually exclusive with the "projectRef" field.
3231
// +kubebuilder:validation:Optional
3332
ExternalProjectRef *ExternalProjectReference `json:"externalProjectRef,omitempty"`
34-
35-
// Name of the secret containing Atlas API private and public keys
33+
// Name of the secret containing Atlas API private and public keys.
3634
ConnectionSecret *api.LocalObjectReference `json:"connectionSecret,omitempty"`
3735
}

api/v1/status/backupschedule.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@ func AtlasBackupScheduleUnsetDeploymentID(ID string) AtlasBackupScheduleStatusOp
4242
type BackupScheduleStatus struct {
4343
api.Common `json:",inline"`
4444

45+
// List of the human-readable names of all deployments utilizing this backup schedule.
4546
DeploymentIDs []string `json:"deploymentID,omitempty"`
4647
}

0 commit comments

Comments
 (0)