AtlasThirdPartyIntegration 自定义资源在Atlas项目中配置第三方集成。这些资源允许您管理 第三方与各种监控服务的集成,以收集和分析Atlas部署的性能。
重要
自定义资源不再默认删除对象
Atlas Kubernetes Operator使用 自定义资源配置文件来管理Atlas配置,但从Atlas Kubernetes Operator2.0 开始,您在Kubernetes中删除的自定义资源不再(默认)在Atlas中删除。相反, Atlas Kubernetes Operator只是停止管理Atlas中的这些资源。
AtlasProject示例,如果您在Kubernetes中删除 自定义资源,默认默认, Atlas Kubernetes Operator不再自动从Atlas中删除相应的项目。这种行为更改旨在帮助防止意外删除。 要学习;了解详情,包括如何将此行为恢复为Atlas Kubernetes Operator2 0之前使用的默认行为,请参阅新的默认值: Atlas Kubernetes Operator2 中的删除保护。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 示例
以下示例显示了一个AtlasThirdPartyIntegration 独立的 CRD,它定义了基本示例中定义的相同 DataDog 集成。通过此自定义资源定义,您可以在某个项目中创建此第三方集成,而该项目并非在您定义此资源的同一Atlas Kubernetes Operator实例中管理。要启用独立操作,必须使用 externalProjectRef 而不是 projectRef,并且必须直接提供 connectionSecret,因为此资源无法从其父项目继承API凭证。
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私钥和公钥的密钥名称。
AtlasThirdPartyIntegration.spec.datadog
Datadog 包含 Datadog 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 对象 | APIKeySecretRef 保存包含 Datadog | true |
| 字符串 | 地区是 Datadog地区 | true |
| 枚举 |
| false |
| 枚举 |
| false |
AtlasThirdPartyIntegration.spec.datadog.apiKeySecretRef
APIKeySecretRef 保存包含 Datadog API密钥的密钥名称。
AtlasThirdPartyIntegration.spec.externalProjectRef
externalProjectRef 保存父Atlas项目ID。与 "projectRef"字段互斥。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 |
| true |
AtlasThirdPartyIntegration.spec.microsoftTeams
MicrosoftTeams 包含Microsoft Teams 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 对象 | URLSecretRef 保存包含Microsoft Teams 密钥 | true |
AtlasThirdPartyIntegration.spec.microsoftTeams.urlSecretRef
URLSecretRef 保存包含Microsoft Teams 密钥URL 的密钥名称。
AtlasThirdPartyIntegration.spec.newRelic
NewRelic 包含 New Relic 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 对象 |
| true |
AtlasThirdPartyIntegration.spec.newRelic.credentialsSecretRef
CredentialsSecretRef 保存的密钥名称包含新 Relic 的凭证:帐户 ID、许可证密钥、读取和写入令牌。
AtlasThirdPartyIntegration.spec.opsGenie
OpsGenie 包含 Ops Genie 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 对象 | APIKeySecretRef 保存的密钥包含 Ops Genie 的 | true |
| 字符串 | 区域是 Ops Genie地区。 | true |
AtlasThirdPartyIntegration.spec.opsGenie.apiKeySecretRef
APIKeySecretRef 保存包含 Ops Genie 的API密钥的密钥的名称。
AtlasThirdPartyIntegration.spec.pagerDuty
PagerDuty 包含 PagerDuty 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 | 区域是寻呼机占空比地区。 | true |
| 对象 |
| true |
AtlasThirdPartyIntegration.spec.pagerDuty.serviceKeySecretRef
ServiceKeySecretRef 保存包含寻呼机值班服务密钥的密钥的名称。
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 的密钥的名称。用户名和密码
AtlasThirdPartyIntegration.spec.slack
Slack包含 Slack 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 对象 | APITokenSecretRef 保存包含Slack | true |
| 字符串 |
| true |
| 字符串 |
| true |
AtlasThirdPartyIntegration.spec.slack.apiTokenSecretRef
APITokenSecretRef 保存包含Slack API令牌的密钥的名称。
AtlasThirdPartyIntegration.spec.victorOps
VictorOps 包含 VictorOps 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 对象 | APIKeySecretRef 是包含 Victor Ops | true |
| 字符串 |
| true |
AtlasThirdPartyIntegration.spec.victorOps.apiKeySecretRef
APIKeySecretRef 是包含 Victor Ops API密钥的密钥的名称。
AtlasThirdPartyIntegration.spec.webhook
Webhook 包含 Webhook 集成的配置字段。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 对象 | URLSecretRef 包含包含 Webhook | true |
AtlasThirdPartyIntegration.spec.webhook.urlSecretRef
URLSecretRef 保存包含 Webhook URL和密钥的密钥名称。
AtlasThirdPartyIntegration.status
AtlasThirdPartyIntegrationStatus 保存着集成的状态
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| []对象 | 包含状态详细信息的条件 | false |
| 字符串 |
| false |
AtlasThirdPartyIntegration.status.conditions
条件包含此API资源当前状态的某个方面的详细信息。
Name | 类型 | 说明 | 必需 |
|---|---|---|---|
| 字符串 |
| true |
| 字符串 | 消息是人类可读的 | true |
| 字符串 | Reason 包含一个编程标识符,指示条件上次转换的 | true |
| 枚举 | 条件的状态,为 True、False、未知之一。枚举:True、False、Unknown | true |
| 字符串 |
| true |
| 整型 |
| false |