Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/ /
Atlas Kubernetes Operator
/

AtlasThirdPartyIntegration Custom Resource

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 AtlasProject Custom 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 READY state. For example, explicitly defining your desired autoscaling behavior in your AtlasDeployment custom 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.

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

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

This section describes the AtlasThirdPartyIntegration custom resource parameters available.

metadata.name

Type: string

Required

Name that the AtlasThirdPartyIntegration Custom Resource uses to add this third-party integration to a project.

metadata.namespace

Type: string

Optional

Namespace that you want to contain the AtlasThirdPartyIntegration custom resource. If unspecified, Atlas Kubernetes Operator uses the current namespace set by kubectl.

spec.connectionSecret

Type: 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.name parameter of the parent atlasProject

  • The default global secret, if spec.connectionSecretRef.name is undefined for the parent atlasProject

This parameter is mandatory for independent CRDs.

Atlas Kubernetes Operator watches secrets only with the label atlas.mongodb.com/type=credentials to avoid watching unnecessary secrets.

The following example labels a secret:

kubectl label secret the-user-password atlas.mongodb.com/type=credentials
spec.externalProjectRef

Type: 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.name if you do not 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.projectRef.name

Type: string

Conditional

Name of the project to which the third-party integration belongs. You must specify an existing AtlasProject Custom 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.type

Type: string

Required

Name of the third-party service to integrate with Atlas. This value must be one of the following:

  • DATADOG

  • MICROSOFT_TEAMS

  • NEW_RELIC

  • OPS_GENIE

  • PAGER_DUTY

  • PROMETHEUS

  • SLACK

  • VICTOR_OPS

  • WEBHOOK

Each integration type requires a distinct set of configuration fields. For example, if you set type to DATADOG, you must configure only the spec.datadog document 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.integrations parameter of your AtlasProject CRD.

spec.datadog

Type: document

Conditional

Document declaring configuration parameters for a Datadog third-party service integration.

You must declare this parameter if you set a spec.type value of DATADOG.

spec.datadog.apiKeySecretRef.name

Type: string

Conditional

Secret containing your Datadog API key.

You must declare this parameter if you set a spec.type value of DATADOG.

spec.datadog.region

Type: string

Conditional

Geographic region in which your Datadog service is hosted.

You must declare this parameter if you set a spec.type value of DATADOG.

spec.datadog.sendCollectionLatencyMetrics

Type: string

Conditional

Toggle that controls whether or not to send collection latency metrics to Datadog. Must be either enabled or disabled.

You must declare this parameter if you set a spec.type value of DATADOG.

spec.datadog.sendDatabaseMetrics

Type: string

Conditional

Toggle that controls whether or not to send database metrics to Datadog. Must be either enabled or disabled.

You must declare this parameter if you set a spec.type value of DATADOG.

spec.microsoftTeams.urlSecretRef.name

Type: string

Conditional

Secret containing your Microsoft Teams secret URL. Must contain a webhookURL value.

You must declare this parameter if you set a spec.type value of MICROSOFT_TEAMS.

spec.newRelic.credentialsSecretRef.name

Type: 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.type value of NEW_RELIC.

spec.opsGenie

Type: document

Conditional

Document declaring configuration parameters for an Ops Genie third-party service integration.

You must declare this parameter if you set a spec.type value of OPS_GENIE.

spec.opsGenie.apiKeySecretRef.name

Type: string

Conditional

Secret containing your Ops Genie API key.

You must declare this parameter if you set a spec.type value of OPS_GENIE.

spec.opsGenie.region

Type: string

Conditional

Geographic region in which your Ops Genie service is hosted.

You must declare this parameter if you set a spec.type value of OPS_GENIE.

spec.pagerDuty

Type: document

Conditional

Document declaring configuration parameters for a Pager Duty third-party service integration.

You must declare this parameter if you set a spec.type value of PAGER_DUTY.

spec.pagerDuty.serviceKeySecretRef.name

Type: string

Conditional

Secret containing your Pager Duty service key.

spec.pagerDuty.region

Type: string

Conditional

Geographic region in which your Ops Genie service is hosted.

You must declare this parameter if you set a spec.type value of OPS_GENIE.

spec.prometheus

Type: document

Conditional

Document declaring configuration parameters for a Prometheus third-party service integration.

You must declare this parameter if you set a spec.type value of PROMETHEUS.

spec.prometheus.enabled

Type: string

Conditional

Toggle that enables Prometheus data collection. Must be either enabled or disabled.

You must declare this parameter if you set a spec.type value of PROMETHEUS.

spec.prometheus.serviceDiscovery

Type: string

Conditional

Toggle that determines how Prometheus discovers services. Must be set to either http or file.

You must declare this parameter if you set a spec.type value of PROMETHEUS.

spec.prometheus.prometheusCredentialsSecretRef.name

Type: string

Conditional

Secret containing your Prometheus username and password.

You must declare this parameter if you set a spec.type value of PROMETHEUS.

spec.slack

Type: document

Conditional

Document declaring configuration parameters for a Slack third-party service integration.

You must declare this parameter if you set a spec.type value of SLACK.

spec.slack.apiTokenSecretRef.name

Type: string

Conditional

Secret containing your Slack API token.

You must declare this parameter if you set a spec.type value of SLACK.

spec.slack.channelName

Type: string

Conditional

Name of the Slack channel to integrate with Atlas.

You must declare this parameter if you set a spec.type value of SLACK.

spec.slack.teamName

Type: string

Conditional

Name of the Slack team to which the spec.slack.channelName belongs.

You must declare this parameter if you set a spec.type value of SLACK.

spec.victorOps

Type: document

Conditional

Document declaring configuration parameters for a Victor Ops third-party service integration.

You must declare this parameter if you set a spec.type value of VICTOR_OPS.

spec.victorOps.apiKeySecretRef.name

Type: string

Conditional

Secret containing Victor Ops' API key.

You must declare this parameter if you set a spec.type value of VICTOR_OPS.

spec.victorOps.routingKey

Type: string

Conditional

Victor Ops routing key.

You must declare this parameter if you set a spec.type value of VICTOR_OPS.

spec.webhook.urlSecretRef.name

Type: string

Conditional

Secret containing your webhook URL and secret.

Back

AtlasStreamInstance

On this page