Skip to content

Commit c310bc4

Browse files
committed
update project crd comments
1 parent 23feb82 commit c310bc4

File tree

13 files changed

+323
-196
lines changed

13 files changed

+323
-196
lines changed

api/v1/atlasproject_types.go

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ func init() {
4343
type AtlasProjectSpec struct {
4444

4545
// Name is the name of the Project that is created in Atlas by the Operator if it doesn't exist yet.
46+
// The name length must not exceed 64 characters. The name must contain only letters, numbers, spaces, dashes, and underscores.
4647
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Name cannot be modified after project creation"
4748
Name string `json:"name"`
4849

4950
// RegionUsageRestrictions designate the project's AWS region when using Atlas for Government.
5051
// This parameter should not be used with commercial Atlas.
51-
// In Atlas for Government, not setting this field (defaulting to NONE) means the project is restricted to COMMERCIAL_FEDRAMP_REGIONS_ONLY
52+
// In Atlas for Government, not setting this field (defaulting to NONE) means the project is restricted to COMMERCIAL_FEDRAMP_REGIONS_ONLY.
5253
// +kubebuilder:validation:Enum=NONE;GOV_REGIONS_ONLY;COMMERCIAL_FEDRAMP_REGIONS_ONLY
5354
// +kubebuilder:default:=NONE
5455
// +optional
@@ -59,8 +60,10 @@ type AtlasProjectSpec struct {
5960
// +optional
6061
ConnectionSecret *common.ResourceRefNamespaced `json:"connectionSecretRef,omitempty"`
6162

62-
// ProjectIPAccessList allows to enable the IP Access List for the Project. See more information at
63+
// ProjectIPAccessList allows the use of the IP Access List for a Project. See more information at
6364
// https://docs.atlas.mongodb.com/reference/api/ip-access-list/add-entries-to-access-list/
65+
// Deprecated: Migrate to the AtlasIPAccessList Custom Resource in accordance with the migration guide
66+
// at https://www.mongodb.com/docs/atlas/operator/current/migrate-parameter-to-resource/#std-label-ak8so-migrate-ptr
6467
// +optional
6568
ProjectIPAccessList []project.IPAccessList `json:"projectIpAccessList,omitempty"`
6669

@@ -70,61 +73,86 @@ type AtlasProjectSpec struct {
7073
MaintenanceWindow project.MaintenanceWindow `json:"maintenanceWindow,omitempty"`
7174

7275
// PrivateEndpoints is a list of Private Endpoints configured for the current Project.
76+
// Deprecated: Migrate to the AtlasPrivateEndpoint Custom Resource in accordance with the migration guide
77+
// at https://www.mongodb.com/docs/atlas/operator/current/migrate-parameter-to-resource/#std-label-ak8so-migrate-ptr
78+
// +optional
7379
PrivateEndpoints []PrivateEndpoint `json:"privateEndpoints,omitempty"`
7480

7581
// CloudProviderAccessRoles is a list of Cloud Provider Access Roles configured for the current Project.
7682
// Deprecated: This configuration was deprecated in favor of CloudProviderIntegrations
83+
// +optional
7784
CloudProviderAccessRoles []CloudProviderAccessRole `json:"cloudProviderAccessRoles,omitempty"`
7885

7986
// CloudProviderIntegrations is a list of Cloud Provider Integration configured for the current Project.
87+
// +optional
8088
CloudProviderIntegrations []CloudProviderIntegration `json:"cloudProviderIntegrations,omitempty"`
8189

8290
// AlertConfiguration is a list of Alert Configurations configured for the current Project.
91+
// If you use this setting, you must also set spec.alertConfigurationSyncEnabled to true for Atlas Kubernetes
92+
// Operator to modify project alert configurations.
93+
// If you omit or leave this setting empty, Atlas Kubernetes Operator doesn't alter the project's alert
94+
// configurations. If creating a project, Atlas applies the default project alert configurations.
8395
AlertConfigurations []AlertConfiguration `json:"alertConfigurations,omitempty"`
8496

8597
// AlertConfigurationSyncEnabled is a flag that enables/disables Alert Configurations sync for the current Project.
8698
// If true - project alert configurations will be synced according to AlertConfigurations.
87-
// If not - alert configurations will not be modified by the operator. They can be managed through API, cli, UI.
99+
// If not - alert configurations will not be modified by the operator. They can be managed through the API, CLI, and UI.
88100
//kubebuilder:default:=false
89101
// +optional
90102
AlertConfigurationSyncEnabled bool `json:"alertConfigurationSyncEnabled,omitempty"`
91103

92104
// NetworkPeers is a list of Network Peers configured for the current Project.
105+
// Deprecated: Migrate to the AtlasNetworkPeering and AtlasNetworkContainer custom resources in accordance with
106+
// the migration guide at https://www.mongodb.com/docs/atlas/operator/current/migrate-parameter-to-resource/#std-label-ak8so-migrate-ptr
107+
// +optional
93108
NetworkPeers []NetworkPeer `json:"networkPeers,omitempty"`
94109

95-
// Flag that indicates whether to create the new project with the default alert settings enabled. This parameter defaults to true
110+
// Flag that indicates whether Atlas Kubernetes Operator creates a project with the default alert configurations.
111+
// If you use this setting, you must also set spec.alertConfigurationSyncEnabled to true for Atlas Kubernetes
112+
// Operator to modify project alert configurations.
113+
// If you set this parameter to false when you create a project, Atlas doesn't add the default alert configurations
114+
// to your project.
115+
// This setting has no effect on existing projects.
96116
// +kubebuilder:default:=true
97117
// +optional
98118
WithDefaultAlertsSettings bool `json:"withDefaultAlertsSettings,omitempty"`
99119

100-
// X509CertRef is the name of the Kubernetes Secret which contains PEM-encoded CA certificate
120+
// X509CertRef is a reference to the Kubernetes Secret which contains PEM-encoded CA certificate.
121+
// Atlas Kubernetes Operator watches secrets only with the label atlas.mongodb.com/type=credentials to avoid
122+
// watching unnecessary secrets.
123+
// +optional
101124
X509CertRef *common.ResourceRefNamespaced `json:"x509CertRef,omitempty"`
102125

103-
// Integrations is a list of MongoDB Atlas integrations for the project
126+
// Integrations is a list of MongoDB Atlas integrations for the project.
127+
// Deprecated: Migrate to the AtlasThirdPartyIntegration custom resource in accordance with the migration guide
128+
// at https://www.mongodb.com/docs/atlas/operator/current/migrate-parameter-to-resource/#std-label-ak8so-migrate-ptr
104129
// +optional
105130
Integrations []project.Integration `json:"integrations,omitempty"`
106131

107-
// EncryptionAtRest allows to set encryption for AWS, Azure and GCP providers
132+
// EncryptionAtRest allows to set encryption for AWS, Azure and GCP providers.
108133
// +optional
109134
EncryptionAtRest *EncryptionAtRest `json:"encryptionAtRest,omitempty"`
110135

111-
// Auditing represents MongoDB Maintenance Windows
136+
// Auditing represents MongoDB Maintenance Windows.
112137
// +optional
113138
Auditing *Auditing `json:"auditing,omitempty"`
114139

115-
// Settings allow to set Project Settings for the project
140+
// Settings allows the configuration of the Project Settings.
116141
// +optional
117142
Settings *ProjectSettings `json:"settings,omitempty"`
118143

119-
// The customRoles lets you create, and change custom roles in your cluster. Use custom roles to specify custom sets of actions that the Atlas built-in roles can't describe.
144+
// CustomRoles lets you create and change custom roles in your cluster.
145+
// Use custom roles to specify custom sets of actions that the Atlas built-in roles can't describe.
146+
// Deprecated: Migrate to the AtlasCustomRoles custom resource in accordance with the migration guide
147+
// at https://www.mongodb.com/docs/atlas/operator/current/migrate-parameter-to-resource/#std-label-ak8so-migrate-ptr
120148
// +optional
121149
CustomRoles []CustomRole `json:"customRoles,omitempty"`
122150

123151
// Teams enable you to grant project access roles to multiple users.
124152
// +optional
125153
Teams []Team `json:"teams,omitempty"`
126154

127-
// BackupCompliancePolicyRef is a reference to the backup compliance CR.
155+
// BackupCompliancePolicyRef is a reference to the backup compliance custom resource.
128156
// +optional
129157
BackupCompliancePolicyRef *common.ResourceRefNamespaced `json:"backupCompliancePolicyRef,omitempty"`
130158
}

api/v1/auditing.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ package v1
1616

1717
// Auditing represents MongoDB Maintenance Windows
1818
type Auditing struct {
19-
// Indicates whether the auditing system captures successful authentication attempts for audit filters using the "atype" : "authCheck" auditing event. For more information, see auditAuthorizationSuccess
19+
// Indicates whether the auditing system captures successful authentication attempts for audit filters using the "atype" : "authCheck" auditing event.
20+
// For more information, see auditAuthorizationSuccess.
2021
// +optional
2122
AuditAuthorizationSuccess bool `json:"auditAuthorizationSuccess,omitempty"`
22-
// JSON-formatted audit filter used by the project
23+
// JSON-formatted audit filter used by the project.
2324
// +optional
2425
AuditFilter string `json:"auditFilter,omitempty"`
25-
// Denotes whether or not the project associated with the {GROUP-ID} has database auditing enabled.
26+
// Denotes whether the project associated with the {GROUP-ID} has database auditing enabled.
2627
// +optional
2728
Enabled bool `json:"enabled,omitempty"`
2829
}

api/v1/common/common.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ type ResourceRef struct {
2626

2727
// ResourceRefNamespaced is a reference to a Kubernetes Resource that allows to configure the namespace
2828
type ResourceRefNamespaced struct {
29-
// Name is the name of the Kubernetes Resource
29+
// Name of the Kubernetes Resource
3030
Name string `json:"name"`
3131

32-
// Namespace is the namespace of the Kubernetes Resource
32+
// Namespace of the Kubernetes Resource
3333
// +optional
3434
Namespace string `json:"namespace"`
3535
}

api/v1/custom_roles.go

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

1515
package v1
1616

17+
// CustomRole lets you create and change a custom role in your cluster.
18+
// Use custom roles to specify custom sets of actions that the Atlas built-in roles can't describe.
19+
// Deprecated: Migrate to the AtlasCustomRoles custom resource in accordance with the migration guide
20+
// at https://www.mongodb.com/docs/atlas/operator/current/migrate-parameter-to-resource/#std-label-ak8so-migrate-ptr
1721
type CustomRole struct {
1822
// Human-readable label that identifies the role. This name must be unique for this custom role in this project.
1923
Name string `json:"name"`

api/v1/encryption_at_rest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"github.com/mongodb/mongodb-atlas-kubernetes/v2/api/v1/common"
1919
)
2020

21-
// EncryptionAtRest allows to specify the Encryption at Rest for AWS, Azure and GCP providers
21+
// EncryptionAtRest configures the Encryption at Rest for the AWS, Azure and GCP providers.
2222
type EncryptionAtRest struct {
2323
AwsKms AwsKms `json:"awsKms,omitempty"` // AwsKms specifies AWS KMS configuration details and whether Encryption at Rest is enabled for an Atlas project.
2424
AzureKeyVault AzureKeyVault `json:"azureKeyVault,omitempty"` // AzureKeyVault specifies Azure Key Vault configuration details and whether Encryption at Rest is enabled for an Atlas project.

api/v1/networkpeer.go

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,45 +22,49 @@ import (
2222
"github.com/mongodb/mongodb-atlas-kubernetes/v2/internal/pointer"
2323
)
2424

25+
// NetworkPeer configured for the current Project.
26+
// Deprecated: Migrate to the AtlasNetworkPeering and AtlasNetworkContainer custom resources in accordance with
27+
// the migration guide at https://www.mongodb.com/docs/atlas/operator/current/migrate-parameter-to-resource/#std-label-ak8so-migrate-ptr
28+
// +optional
2529
type NetworkPeer struct {
26-
//AccepterRegionName is the provider region name of user's vpc.
30+
// AccepterRegionName is the provider region name of user's VPC.
2731
// +optional
2832
AccepterRegionName string `json:"accepterRegionName"`
2933
// ContainerRegion is the provider region name of Atlas network peer container. If not set, AccepterRegionName is used.
3034
// +optional
3135
ContainerRegion string `json:"containerRegion"`
32-
// AccountID of the user's vpc.
36+
// AccountID of the user's VPC.
3337
// +optional
3438
AWSAccountID string `json:"awsAccountId,omitempty"`
3539
// ID of the network peer container. If not set, operator will create a new container with ContainerRegion and AtlasCIDRBlock input.
3640
// +optional
3741
ContainerID string `json:"containerId"`
38-
//ProviderName is the name of the provider. If not set, it will be set to "AWS".
42+
// ProviderName is the name of the provider. If not set, it will be set to "AWS".
3943
// +optional
4044
ProviderName provider.ProviderName `json:"providerName,omitempty"`
41-
//User VPC CIDR.
45+
// User VPC CIDR.
4246
// +optional
4347
RouteTableCIDRBlock string `json:"routeTableCidrBlock,omitempty"`
44-
//AWS VPC ID.
48+
// AWS VPC ID.
4549
// +optional
4650
VpcID string `json:"vpcId,omitempty"`
47-
//Atlas CIDR. It needs to be set if ContainerID is not set.
51+
// Atlas CIDR. It needs to be set if ContainerID is not set.
4852
// +optional
4953
AtlasCIDRBlock string `json:"atlasCidrBlock"`
50-
//AzureDirectoryID is the unique identifier for an Azure AD directory.
54+
// AzureDirectoryID is the unique identifier for an Azure AD directory.
5155
// +optional
5256
AzureDirectoryID string `json:"azureDirectoryId,omitempty"`
5357
// AzureSubscriptionID is the unique identifier of the Azure subscription in which the VNet resides.
5458
// +optional
5559
AzureSubscriptionID string `json:"azureSubscriptionId,omitempty"`
56-
//ResourceGroupName is the name of your Azure resource group.
60+
// ResourceGroupName is the name of your Azure resource group.
5761
// +optional
5862
ResourceGroupName string `json:"resourceGroupName,omitempty"`
5963
// VNetName is name of your Azure VNet. Its applicable only for Azure.
6064
// +optional
6165
VNetName string `json:"vnetName,omitempty"`
62-
// +optional
6366
// User GCP Project ID. Its applicable only for GCP.
67+
// +optional
6468
GCPProjectID string `json:"gcpProjectId,omitempty"`
6569
// GCP Network Peer Name. Its applicable only for GCP.
6670
// +optional

api/v1/privateendpoint.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@ import (
2222
"github.com/mongodb/mongodb-atlas-kubernetes/v2/internal/pointer"
2323
)
2424

25+
// PrivateEndpoint is a list of Private Endpoints configured for the current Project.
26+
// Deprecated: Migrate to the AtlasPrivateEndpoint Custom Resource in accordance with the migration guide
27+
// at https://www.mongodb.com/docs/atlas/operator/current/migrate-parameter-to-resource/#std-label-ak8so-migrate-ptr
2528
type PrivateEndpoint struct {
26-
// Cloud provider for which you want to retrieve a private endpoint service. Atlas accepts AWS or AZURE.
29+
// Cloud provider for which you want to retrieve a private endpoint service. Atlas accepts AWS, GCP, or AZURE.
2730
// +kubebuilder:validation:Enum=AWS;GCP;AZURE;TENANT
2831
Provider provider.ProviderName `json:"provider"`
2932
// Cloud provider region for which you want to create the private endpoint service.
3033
Region string `json:"region"`
31-
// Unique identifier of the private endpoint you created in your AWS VPC or Azure Vnet.
34+
// Unique identifier of the private endpoint you created in your AWS VPC or Azure VNet.
3235
// +optional
3336
ID string `json:"id,omitempty"`
3437
// Private IP address of the private endpoint network interface you created in your Azure VNet.
@@ -37,7 +40,7 @@ type PrivateEndpoint struct {
3740
// Unique identifier of the Google Cloud project in which you created your endpoints.
3841
// +optional
3942
GCPProjectID string `json:"gcpProjectId,omitempty"`
40-
// Unique identifier of the endpoint group. The endpoint group encompasses all of the endpoints that you created in Google Cloud.
43+
// Unique identifier of the endpoint group. The endpoint group encompasses all the endpoints that you created in Google Cloud.
4144
// +optional
4245
EndpointGroupName string `json:"endpointGroupName,omitempty"`
4346
// Collection of individual private endpoints that comprise your endpoint group.

api/v1/project/integration.go

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,53 +18,78 @@ import (
1818
"github.com/mongodb/mongodb-atlas-kubernetes/v2/api/v1/common"
1919
)
2020

21+
// Integration for the project between Atlas and a third party service.
22+
// Deprecated: Migrate to the AtlasThirdPartyIntegration custom resource in accordance with the migration guide
23+
// at https://www.mongodb.com/docs/atlas/operator/current/migrate-parameter-to-resource/#std-label-ak8so-migrate-ptr
2124
type Integration struct {
22-
// Third Party Integration type such as Slack, New Relic, etc
25+
// Third Party Integration type such as Slack, New Relic, etc.
26+
// Each integration type requires a distinct set of configuration fields.
27+
// For example, if you set type to DATADOG, you must configure only datadog subfields.
2328
// +kubebuilder:validation:Enum=PAGER_DUTY;SLACK;DATADOG;NEW_RELIC;OPS_GENIE;VICTOR_OPS;FLOWDOCK;WEBHOOK;MICROSOFT_TEAMS;PROMETHEUS
2429
// +optional
2530
Type string `json:"type,omitempty"`
31+
// Reference to a Kubernetes Secret containing your Unique 40-hexadecimal digit string that identifies your New Relic license.
2632
// +optional
2733
LicenseKeyRef common.ResourceRefNamespaced `json:"licenseKeyRef,omitempty"`
34+
// Unique 40-hexadecimal digit string that identifies your New Relic account.
2835
// +optional
2936
AccountID string `json:"accountId,omitempty"`
37+
// Reference to a Kubernetes Secret containing the insert key associated with your New Relic account.
3038
// +optional
3139
WriteTokenRef common.ResourceRefNamespaced `json:"writeTokenRef,omitempty"`
40+
// Reference to a Kubernetes Secret containing the query key associated with your New Relic account.
3241
// +optional
3342
ReadTokenRef common.ResourceRefNamespaced `json:"readTokenRef,omitempty"`
43+
// Reference to a Kubernetes Secret containing your API Key for Datadog, OpsGenie or Victor Ops.
3444
// +optional
3545
APIKeyRef common.ResourceRefNamespaced `json:"apiKeyRef,omitempty"`
46+
// Region code indicating which regional API Atlas uses to access PagerDuty, Datadog, or OpsGenie.
3647
// +optional
3748
Region string `json:"region,omitempty"`
49+
// Reference to a Kubernetes Secret containing the service key associated with your PagerDuty account.
3850
// +optional
3951
ServiceKeyRef common.ResourceRefNamespaced `json:"serviceKeyRef,omitempty"`
52+
// Reference to a Kubernetes Secret containing the Key that allows Atlas to access your Slack account.
4053
// +optional
4154
APITokenRef common.ResourceRefNamespaced `json:"apiTokenRef,omitempty"`
55+
// Human-readable label that identifies your Slack team.
4256
// +optional
4357
TeamName string `json:"teamName,omitempty"`
58+
// Name of the Slack channel to which Atlas sends alert notifications.
4459
// +optional
4560
ChannelName string `json:"channelName,omitempty"`
61+
// Reference to a Kubernetes Secret containing the Routing key associated with your Splunk On-Call account.
62+
// Used for Victor Ops.
4663
// +optional
4764
RoutingKeyRef common.ResourceRefNamespaced `json:"routingKeyRef,omitempty"`
4865
// +optional
4966
FlowName string `json:"flowName,omitempty"`
5067
// +optional
5168
OrgName string `json:"orgName,omitempty"`
69+
// Endpoint web address to which Atlas sends notifications.
70+
// Used for Webhooks.
5271
// +optional
5372
URL string `json:"url,omitempty"`
73+
// Reference to a Kubernetes Secret containing the secret for your Webhook.
5474
// +optional
5575
SecretRef common.ResourceRefNamespaced `json:"secretRef,omitempty"`
5676
// +optional
5777
Name string `json:"name,omitempty"`
78+
// Endpoint web address of the Microsoft Teams webhook to which Atlas sends notifications.
5879
// +optional
5980
MicrosoftTeamsWebhookURL string `json:"microsoftTeamsWebhookUrl,omitempty"`
81+
// Human-readable label that identifies your Prometheus incoming webhook.
6082
// +optional
6183
UserName string `json:"username,omitempty"`
84+
// Reference to a Kubernetes Secret containing the password to allow Atlas to access your Prometheus account.
6285
// +optional
6386
PasswordRef common.ResourceRefNamespaced `json:"passwordRef,omitempty"`
87+
// Desired method to discover the Prometheus service.
6488
// +optional
6589
ServiceDiscovery string `json:"serviceDiscovery,omitempty"`
6690
// +optional
6791
Scheme string `json:"scheme,omitempty"`
92+
//
6893
// +optional
6994
Enabled bool `json:"enabled,omitempty"`
7095
}

api/v1/project/ipaccesslist.go

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

1515
package project
1616

17+
// IPAccessList allows the use of the IP Access List for a Project. See more information at
18+
// https://docs.atlas.mongodb.com/reference/api/ip-access-list/add-entries-to-access-list/
19+
// Deprecated: Migrate to the AtlasIPAccessList Custom Resource in accordance with the migration guide
20+
// at https://www.mongodb.com/docs/atlas/operator/current/migrate-parameter-to-resource/#std-label-ak8so-migrate-ptr
1721
type IPAccessList struct {
1822
// Unique identifier of AWS security group in this access list entry.
1923
// +optional

api/v1/project/maintenancewindow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ package project
1616

1717
type MaintenanceWindow struct {
1818
// Day of the week when you would like the maintenance window to start as a 1-based integer.
19-
// Sunday 1, Monday 2, Tuesday 3, Wednesday 4, Thursday 5, Friday 6, Saturday 7
19+
// Sunday 1, Monday 2, Tuesday 3, Wednesday 4, Thursday 5, Friday 6, Saturday 7.
2020
// +optional
2121
// +kubebuilder:validation:Minimum=1
2222
// +kubebuilder:validation:Maximum=7

0 commit comments

Comments
 (0)