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.
重要
自定义资源不再默认删除对象
Atlas Kubernetes Operator使用自定义资源配置文件来管理Atlas配置,但从Atlas Kubernetes Operator2.0 开始,您在Kubernetes中删除的自定义资源不再(默认)在Atlas中删除。相反, Atlas Kubernetes Operator只是停止管理Atlas中的这些资源。
AtlasProject示例,如果您在Kubernetes中删除 自定义资源,默认默认, Atlas Kubernetes Operator不再自动从Atlas中删除相应的项目。这种行为更改旨在帮助防止意外删除。 要学习;了解详情,包括如何将此行为恢复为在Atlas Kubernetes Operator.2 0之前使用的默认,请参阅新默认值: Atlas Kubernetes2 Operator.0 中的删除保护。同样,如果您使用Atlas Kubernetes Operator从Kubernetes中的Atlas项目中删除团队,则Atlas Kubernetes Operator不会从Atlas中删除团队。
显式定义所需的配置详细信息,以避免隐式使用默认Atlas配置值。 在某些情况下,继承Atlas默认值可能会导致协调循环,从而阻止自定义资源实现
READY状态。 示例,在AtlasDeployment自定义资源中显式定义所需的自动伸缩行为(如所包含的示例所示)可确保自定义资源中的静态实例大小不会重复应用于已启用自动伸缩的Atlas部署。autoScaling: diskGB: enabled: true compute: enabled: true scaleDownEnabled: true minInstanceSize: M30 maxInstanceSize: M40
Atlas Kubernetes Operator使用Atlas 第三方服务集成API资源执行以下操作之一:
创建新的第三方服务集成。
更新现有的第三方服务集成。
示例
基本示例
以下示例显示了一个 AtlasThirdPartyIntegration 自定义资源,该资源在 my-project项目中定义了 DataDog 集成。
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
独立 CRD 示例
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
参数
AtlasThirdPartyIntegration
AtlasThirdPartyIntegration 是 atlas 3第三方集成API的模式。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 | atlas.mongodb.com/v1 | true |
| 字符串 |
| true |
| 对象 | 有关 | true |
| 对象 |
| false |
| 对象 |
| false |
AtlasThirdPartyIntegration.spec
AtlasThirdPartyIntegrationSpec 包含集成的预期配置
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 枚举 | 集成的类型。枚举: | true |
| 对象 | 包含Atlas | false |
| 对象 | Datadog 包含 Datadog 集成的配置字段。 | false |
| 对象 |
| false |
| 对象 |
| false |
| 对象 |
| false |
| 对象 |
| false |
| 对象 |
| false |
| 对象 |
| false |
| 对象 | Prometheus 包含 Prometheus 集成的配置字段。 | false |
| 对象 | Slack包含 Slack 集成的配置字段。 | false |
| 对象 |
| false |
| 对象 | Webhook 包含 Webhook 集成的配置字段。 | false |
AtlasThirdPartyIntegration.spec.connectionSecret
包含Atlas API私钥和公钥的密钥名称。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 | true |
AtlasThirdPartyIntegration.spec.datadog
Datadog 包含 Datadog 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 对象 | APIKeySecretRef 保存包含 Datadog | true |
| 字符串 | 区域是 Datadog区域 | true |
| 枚举 |
| false |
| 枚举 |
| false |
| 枚举 |
| false |
| 枚举 |
| false |
AtlasThirdPartyIntegration.spec.datadog.apiKeySecretRef
APIKeySecretRef 保存包含 Datadog API 密钥的 Secret 名称。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 | true |
AtlasThirdPartyIntegration.spec.externalProjectRef
externalProjectRef 保存父Atlas群组 ID(group ID)。与 "projectRef"字段互斥。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 |
| true |
AtlasThirdPartyIntegration.spec.microsoftTeams
MicrosoftTeams 包含 Microsoft Teams 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 对象 | URLSecretRef 保存包含 Microsoft Teams 密钥 | true |
AtlasThirdPartyIntegration.spec.microsoftTeams.urlSecretRef
URLSecretRef 保存包含 Microsoft Teams 密钥 URL 的密钥名称。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 | true |
AtlasThirdPartyIntegration.spec.newRelic
NewRelic 包含 New Relic 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 对象 |
| true |
AtlasThirdPartyIntegration.spec.newRelic.credentialsSecretRef
CredentialsSecretRef 保存的密钥名称包含新 Relic 的凭证:帐户 id、许可证密钥、读取和写入令牌。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 | true |
AtlasThirdPartyIntegration.spec.opsGenie
OpsGenie 包含 Ops Genie 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 对象 | APIKeySecretRef 保存的密钥包含 Ops Genie 的 | true |
| 字符串 | 区域是 Ops Genie区域。 | true |
AtlasThirdPartyIntegration.spec.opsGenie.apiKeySecretRef
APIKeySecretRef 保存包含 Ops Genie 的 API 密钥的 Secret 名称。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 | true |
AtlasThirdPartyIntegration.spec.pagerDuty
PagerDuty 包含 PagerDuty 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 | 区域是寻呼机占空比地区。 | true |
| 对象 |
| true |
AtlasThirdPartyIntegration.spec.pagerDuty.serviceKeySecretRef
ServiceKeySecretRef 保存包含寻呼机值班服务密钥的密钥的名称。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 | true |
AtlasThirdPartyIntegration.spec.projectRef
projectRef 是对父 AtlasProject资源的引用。与 "externalProjectRef"字段互斥。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 | Kubernetes资源名称 | true |
| 字符串 | Kubernetes资源的命名空间 | false |
AtlasThirdPartyIntegration.spec.prometheus
Prometheus 包含 Prometheus 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 | 启用 Prometheus 集成后,Enabled 为 true。 | true |
| 对象 |
| true |
| 枚举 |
| true |
AtlasThirdPartyIntegration.spec.prometheus.prometheusCredentialsSecretRef
PrometheusCredentialsSecretRef 保存包含 Prometheus 的密钥的名称。用户名和密码
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 | true |
AtlasThirdPartyIntegration.spec.slack
Slack包含 Slack 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 对象 | APITokenSecretRef 保存包含 Slack | true |
| 字符串 |
| true |
| 字符串 |
| true |
AtlasThirdPartyIntegration.spec.slack.apiTokenSecretRef
APITokenSecretRef 保存包含 Slack API 令牌的密钥的名称。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 | true |
AtlasThirdPartyIntegration.spec.victorOps
VictorOps 包含 VictorOps 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 对象 | APIKeySecretRef 是包含 Victor Ops | true |
| 字符串 |
| true |
AtlasThirdPartyIntegration.spec.victorOps.apiKeySecretRef
APIKeySecretRef 是包含 Victor Ops API 密钥的 Secret 的名称。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 | true |
AtlasThirdPartyIntegration.spec.webhook
Webhook 包含 Webhook 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 对象 | URLSecretRef 包含包含 Webhook | true |
AtlasThirdPartyIntegration.spec.webhook.urlSecretRef
URLSecretRef 保存包含 Webhook URL 和密钥的密钥名称。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 | true |
AtlasThirdPartyIntegration.status
AtlasThirdPartyIntegrationStatus 保存着集成的状态
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| []对象 | 包含状态详细信息的条件 | false |
| 字符串 |
| false |
AtlasThirdPartyIntegration.status.conditions
条件包含此API资源当前省/市/自治区的某个方面的详细信息。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 |
| true |
| 字符串 | 消息是人类可读的 | true |
| 字符串 | Reason 包含一个编程标识符,指示条件上次转换的 | true |
| 枚举 | 条件的状态,为 True、False、未知之一。枚举:True、False、Unknown | true |
| 字符串 |
| true |
| 整型 |
| false |