The AtlasThirdPartyIntegration custom resource configures third party integrations in an Atlas project. These resources allow you to manage third-party integrations with various monitoring services to collect and analyze the performance of your Atlas deployment.
Important
Custom Resources No Longer Delete Objects by Default
Atlas Kubernetes Operator uses custom resource configuration files to manage your Atlas configuration, but as of Atlas Kubernetes Operator 2.0, custom resources you delete in Kubernetes are no longer (by default) deleted in Atlas. Instead, Atlas Kubernetes Operator simply stops managing those resources in Atlas. For example, if you delete an
AtlasProjectCustom Resource in Kubernetes, by default the Atlas Kubernetes Operator no longer automatically deletes the corresponding project from Atlas. This change in behavior is intended to help prevent accidental or unexpected deletions. To learn more, including how to revert this behavior to the default used prior to Atlas Kubernetes Operator 2.0, see New Default: Deletion Protection in Atlas Kubernetes Operator 2.0.Similarly, Atlas Kubernetes Operator does not delete teams from Atlas if you remove them from an Atlas project in Kubernetes with the Atlas Kubernetes Operator.
Explicitly define your desired configuration details in order to avoid implicitly using default Atlas configuration values. In some cases, inheriting Atlas defaults may result in a reconciliation loop which can prevent your custom resource from achieving a
READYstate. For example, explicitly defining your desired autoscaling behavior in yourAtlasDeploymentcustom resource, as shown in the included example, ensures that a static instance size in your custom resource is not being repeatedly applied to an Atlas deployment which has autoscaling enabled.autoScaling: diskGB: enabled: true compute: enabled: true scaleDownEnabled: true minInstanceSize: M30 maxInstanceSize: M40
Atlas Kubernetes Operator takes one of the following actions using the Atlas Third-Party Service Integration API Resource:
Creates a new third-party service integration.
Updates an existing third-party service integration.
Examples
Basic Example
The following example shows an AtlasThirdPartyIntegration custom resource that defines a Datadog integration within the my-project project.
apiVersion: atlas.mongodb.com/v1 kind: AtlasThirdPartyIntegration metadata: name: my-atlas-integ spec: projectRef: name: my-project namespace: my-operator-namespace type: DATADOG datadog: apiKeySecretRef: name: datadog-secret region: US sendCollectionLatencyMetrics: enabled sendDatabaseMetrics: enabled
Independent CRD Example
The following example shows an AtlasThirdPartyIntegration independent CRD that defines the same Datadog integration defined in the Basic Example. This custom resource definition allows you to create this third-party integration in a project you don't manage in the same instance of Atlas Kubernetes Operator with which you define this resource. To enable independent operation, you must use an externalProjectRef instead of a projectRef, and you must supply a connectionSecret directly since this resource can't inherit API credentials from its parent project.
apiVersion: atlas.mongodb.com/v1 kind: AtlasThirdPartyIntegration metadata: name: my-atlas-integ spec: externalProjectRef: projectID: 66e2f2b621571b7e69a89b66 connectionSecret: name: atlas-connection-secret type: DATADOG datadog: apiKeySecretRef: name: datadog-secret region: US sendCollectionLatencyMetrics: enabled sendDatabaseMetrics: enabled
Parameters
This section describes the AtlasThirdPartyIntegration custom resource parameters available.
metadata.nameType: string
Required
Name that the
AtlasThirdPartyIntegrationCustom Resource uses to add this third-party integration to a project.
metadata.namespaceType: string
Optional
Namespace that you want to contain the
AtlasThirdPartyIntegrationcustom resource. If unspecified, Atlas Kubernetes Operator uses the current namespace set bykubectl.
spec.connectionSecretType: string
Conditional
Name of the opaque secret that contains the organization ID and API keys that Atlas Kubernetes Operator uses to connect to Atlas. If unspecified, Atlas Kubernetes Operator falls back to either:
The
spec.connectionSecretRef.nameparameter of the parentatlasProjectThe default
globalsecret, ifspec.connectionSecretRef.nameis undefined for the parentatlasProject
This parameter is mandatory for independent CRDs.
Atlas Kubernetes Operator watches secrets only with the label
atlas.mongodb.com/type=credentialsto avoid watching unnecessary secrets.The following example labels a secret:
kubectl label secret the-user-password atlas.mongodb.com/type=credentials
spec.externalProjectRefType: string
Conditional
ID of the project to which the third-party integration belongs. You must specify the project ID of an existing Atlas Project. This parameter is required for third-party integrations that belong to projects managed by either:
A different instance of Atlas Kubernetes Operator
Tooling other than Atlas Kubernetes Operator
For deployments who belong to projects managed by the same instance of Atlas Kubernetes Operator, use
spec.projectRef.nameif you do not usespec.externalProjectRef.id.A third-party integration can only belong to one project. To define the same third-party integration for multiple projects, create custom resource definitions for each project.
spec.projectRef.nameType: string
Conditional
Name of the project to which the third-party integration belongs. You must specify an existing
AtlasProjectCustom Resource. This parameter applies only to third-party integrations that belong to projects managed by the same instance Atlas Kubernetes Operator.For third-party integrations that belong to projects managed by either:
a different instance of Atlas Kubernetes Operator
tooling other than Atlas Kubernetes Operator
use
spec.externalProjectRef.id.A third-party integration can only belong to one project. To define the same third-party integration for multiple projects, create custom resource definitions for each project.
spec.typeType: string
Required
Name of the third-party service to integrate with Atlas. This value must be one of the following:
DATADOGMICROSOFT_TEAMSNEW_RELICOPS_GENIEPAGER_DUTYPROMETHEUSSLACKVICTOR_OPSWEBHOOK
Each integration
typerequires a distinct set of configuration fields. For example, if you settypetoDATADOG, you must configure only thespec.datadogdocument and its subfields.To define multiple third-party integrations within the same project, you must create a separated CRD for each. You can define only one instance of each integration type within a given project. This applies both to this CRD and to the
spec.integrationsparameter of yourAtlasProjectCRD.
spec.datadogType: document
Conditional
Document declaring configuration parameters for a Datadog third-party service integration.
You must declare this parameter if you set a
spec.typevalue ofDATADOG.
spec.datadog.apiKeySecretRef.nameType: string
Conditional
Secret containing your Datadog API key.
You must declare this parameter if you set a
spec.typevalue ofDATADOG.
spec.datadog.regionType: string
Conditional
Geographic region in which your Datadog service is hosted.
You must declare this parameter if you set a
spec.typevalue ofDATADOG.
spec.datadog.sendCollectionLatencyMetricsType: string
Conditional
Toggle that controls whether or not to send collection latency metrics to Datadog. Must be either
enabledordisabled.You must declare this parameter if you set a
spec.typevalue ofDATADOG.
spec.datadog.sendDatabaseMetricsType: string
Conditional
Toggle that controls whether or not to send database metrics to Datadog. Must be either
enabledordisabled.You must declare this parameter if you set a
spec.typevalue ofDATADOG.
spec.microsoftTeams.urlSecretRef.nameType: string
Conditional
Secret containing your Microsoft Teams secret URL. Must contain a
webhookURLvalue.You must declare this parameter if you set a
spec.typevalue ofMICROSOFT_TEAMS.
spec.newRelic.credentialsSecretRef.nameType: string
Conditional
Secret containing your New Relic credentials. This must include the following:
New Relic account ID
New Relic license key
New Relic read and write tokens
You must declare this parameter if you set a
spec.typevalue ofNEW_RELIC.
spec.opsGenieType: document
Conditional
Document declaring configuration parameters for an Ops Genie third-party service integration.
You must declare this parameter if you set a
spec.typevalue ofOPS_GENIE.
spec.opsGenie.apiKeySecretRef.nameType: string
Conditional
Secret containing your Ops Genie API key.
You must declare this parameter if you set a
spec.typevalue ofOPS_GENIE.
spec.opsGenie.regionType: string
Conditional
Geographic region in which your Ops Genie service is hosted.
You must declare this parameter if you set a
spec.typevalue ofOPS_GENIE.
spec.pagerDutyType: document
Conditional
Document declaring configuration parameters for a Pager Duty third-party service integration.
You must declare this parameter if you set a
spec.typevalue ofPAGER_DUTY.
spec.pagerDuty.serviceKeySecretRef.nameType: string
Conditional
Secret containing your Pager Duty service key.
spec.pagerDuty.regionType: string
Conditional
Geographic region in which your Ops Genie service is hosted.
You must declare this parameter if you set a
spec.typevalue ofOPS_GENIE.
spec.prometheusType: document
Conditional
Document declaring configuration parameters for a Prometheus third-party service integration.
You must declare this parameter if you set a
spec.typevalue ofPROMETHEUS.
spec.prometheus.enabledType: string
Conditional
Toggle that enables Prometheus data collection. Must be either
enabledordisabled.You must declare this parameter if you set a
spec.typevalue ofPROMETHEUS.
spec.prometheus.serviceDiscoveryType: string
Conditional
Toggle that determines how Prometheus discovers services. Must be set to either
httporfile.You must declare this parameter if you set a
spec.typevalue ofPROMETHEUS.
spec.prometheus.prometheusCredentialsSecretRef.nameType: string
Conditional
Secret containing your Prometheus username and password.
You must declare this parameter if you set a
spec.typevalue ofPROMETHEUS.
spec.slackType: document
Conditional
Document declaring configuration parameters for a Slack third-party service integration.
You must declare this parameter if you set a
spec.typevalue ofSLACK.
spec.slack.apiTokenSecretRef.nameType: string
Conditional
Secret containing your Slack API token.
You must declare this parameter if you set a
spec.typevalue ofSLACK.
spec.slack.channelNameType: string
Conditional
Name of the Slack channel to integrate with Atlas.
You must declare this parameter if you set a
spec.typevalue ofSLACK.
spec.slack.teamNameType: string
Conditional
Name of the Slack team to which the
spec.slack.channelNamebelongs.You must declare this parameter if you set a
spec.typevalue ofSLACK.
spec.victorOpsType: document
Conditional
Document declaring configuration parameters for a Victor Ops third-party service integration.
You must declare this parameter if you set a
spec.typevalue ofVICTOR_OPS.
spec.victorOps.apiKeySecretRef.nameType: string
Conditional
Secret containing Victor Ops' API key.
You must declare this parameter if you set a
spec.typevalue ofVICTOR_OPS.