mongodb / mongodb-atlas-kubernetes

MongoDB Atlas Kubernetes Operator - Manage your MongoDB Atlas clusters from Kubernetes
http://www.mongodb.com/cloud/atlas
Apache License 2.0
151 stars 78 forks source link

Operator does not reconcile notifications (Slack in my case) #863

Closed zelig81 closed 1 year ago

zelig81 commented 1 year ago

What did you do to encounter the bug? Steps to reproduce the behavior:

What did you expect? A clear and concise description of what you expected to happen.

What happened instead? A clear and concise description of what happened instead

Operator Information

Kubernetes Cluster Information

Additional context Add any other context about the problem here.

AtlasProject k8s manifest ```yaml --- apiVersion: atlas.mongodb.com/v1 kind: AtlasProject metadata: creationTimestamp: null name: poc_project namespace: atlas spec: alertConfigurations: - enabled: true eventTypeName: REPLICATION_OPLOG_WINDOW_RUNNING_OUT metricThreshold: threshold: "" notifications: - delayMin: 0 emailEnabled: true intervalMin: 60 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP - apiToken: '*************************************************************************1234' channelName: ilya-test-channel delayMin: 0 intervalMin: 60 typeName: SLACK threshold: operator: LESS_THAN threshold: "1.000000" units: HOURS - enabled: true eventTypeName: NO_PRIMARY metricThreshold: threshold: "" notifications: - delayMin: 15 emailEnabled: true intervalMin: 60 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP - apiToken: '*************************************************************************1234' channelName: ilya-test-channel delayMin: 0 intervalMin: 60 typeName: SLACK threshold: {} - enabled: true eventTypeName: CLUSTER_MONGOS_IS_MISSING metricThreshold: threshold: "" notifications: - delayMin: 15 emailEnabled: true intervalMin: 60 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP threshold: {} - enabled: true eventTypeName: OUTSIDE_METRIC_THRESHOLD metricThreshold: metricName: CONNECTIONS_PERCENT mode: AVERAGE operator: GREATER_THAN threshold: "80.000000" units: RAW notifications: - delayMin: 0 emailEnabled: true intervalMin: 60 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP threshold: {} - enabled: true eventTypeName: OUTSIDE_METRIC_THRESHOLD metricThreshold: metricName: DISK_PARTITION_SPACE_USED_DATA mode: AVERAGE operator: GREATER_THAN threshold: "90.000000" units: RAW notifications: - delayMin: 0 emailEnabled: true intervalMin: 60 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP threshold: {} - enabled: true eventTypeName: OUTSIDE_METRIC_THRESHOLD metricThreshold: metricName: QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED mode: AVERAGE operator: GREATER_THAN threshold: "1000.000000" units: RAW notifications: - delayMin: 0 emailEnabled: true intervalMin: 60 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP threshold: {} - enabled: true eventTypeName: CREDIT_CARD_ABOUT_TO_EXPIRE metricThreshold: threshold: "" notifications: - delayMin: 0 emailEnabled: true intervalMin: 1440 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP threshold: {} - enabled: true eventTypeName: OUTSIDE_METRIC_THRESHOLD metricThreshold: metricName: NORMALIZED_SYSTEM_CPU_USER mode: AVERAGE operator: GREATER_THAN threshold: "95.000000" units: RAW notifications: - delayMin: 0 emailEnabled: true intervalMin: 60 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP threshold: {} - enabled: true eventTypeName: HOST_HAS_INDEX_SUGGESTIONS metricThreshold: threshold: "" notifications: - delayMin: 10 emailEnabled: true intervalMin: 60 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP threshold: {} - enabled: true eventTypeName: HOST_MONGOT_CRASHING_OOM metricThreshold: threshold: "" notifications: - delayMin: 0 emailEnabled: true intervalMin: 60 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP threshold: {} - enabled: true eventTypeName: OUTSIDE_SERVERLESS_METRIC_THRESHOLD metricThreshold: metricName: SERVERLESS_CONNECTIONS_PERCENT mode: AVERAGE operator: GREATER_THAN threshold: "80.000000" units: RAW notifications: - delayMin: 0 emailEnabled: true intervalMin: 60 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP threshold: {} - enabled: true eventTypeName: OUTSIDE_SERVERLESS_METRIC_THRESHOLD metricThreshold: metricName: SERVERLESS_DATA_SIZE_TOTAL mode: AVERAGE operator: GREATER_THAN threshold: "0.750000" units: TERABYTES notifications: - delayMin: 0 emailEnabled: true intervalMin: 60 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP threshold: {} - enabled: true eventTypeName: HOST_NOT_ENOUGH_DISK_SPACE metricThreshold: threshold: "" notifications: - delayMin: 0 emailEnabled: true intervalMin: 60 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP threshold: {} - enabled: true eventTypeName: JOINED_GROUP metricThreshold: threshold: "" notifications: - delayMin: 0 emailEnabled: true intervalMin: 60 smsEnabled: false typeName: GROUP threshold: {} - enabled: true eventTypeName: OUTSIDE_SERVERLESS_METRIC_THRESHOLD metricThreshold: metricName: SERVERLESS_TOTAL_READ_UNITS mode: AVERAGE operator: GREATER_THAN threshold: "0.250000" units: MILLION_RPU notifications: - delayMin: 30 emailEnabled: true intervalMin: 720 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP threshold: {} - enabled: true eventTypeName: OUTSIDE_SERVERLESS_METRIC_THRESHOLD metricThreshold: metricName: SERVERLESS_TOTAL_READ_UNITS mode: AVERAGE operator: GREATER_THAN threshold: "1.000000" units: MILLION_RPU notifications: - delayMin: 5 emailEnabled: true intervalMin: 120 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP threshold: {} - enabled: true eventTypeName: OUTSIDE_METRIC_THRESHOLD metricThreshold: metricName: SEARCH_MAX_NUMBER_OF_LUCENE_DOCS mode: AVERAGE operator: GREATER_THAN threshold: "1.000000" units: BILLION notifications: - delayMin: 0 emailEnabled: true intervalMin: 60 roles: - GROUP_OWNER smsEnabled: false typeName: GROUP threshold: {} auditing: auditAuthorizationSuccess: false enabled: false connectionSecretRef: name: "" encryptionAtRest: awsKms: enabled: false valid: false azureKeyVault: enabled: false googleCloudKms: enabled: false integrations: - apiKeyRef: name: "" namespace: "" apiTokenRef: name: 61d6f7c953bba44e086a003f-integration-slack namespace: atlas licenseKeyRef: name: "" namespace: "" passwordRef: name: "" namespace: "" readTokenRef: name: "" namespace: "" routingKeyRef: name: "" namespace: "" secretRef: name: "" namespace: "" serviceKeyRef: name: "" namespace: "" teamName: MySlackTeam type: SLACK writeTokenRef: name: "" namespace: "" maintenanceWindow: {} name: POC_PROJECT projectIpAccessList: - cidrBlock: 0.0.0.0/0 comment: temporary settings: isCollectDatabaseSpecificsStatisticsEnabled: true isDataExplorerEnabled: true isPerformanceAdvisorEnabled: true isRealtimePerformancePanelEnabled: true isSchemaAdvisorEnabled: true status: conditions: [] --- apiVersion: v1 data: password: KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKjEyMzQ= kind: Secret metadata: creationTimestamp: null labels: atlas.mongodb.com/type: credentials name: 61d6f7c953bba44e086a003f-integration-slack namespace: atlas ```
igor-karpukhin commented 1 year ago

Hi @zelig81. If I understood you correctly, you added two notifications, ran atlas kubernetes config generate, removed one notification and then applied the exported result to the cluster? Is that correct?

zelig81 commented 1 year ago

You are absolutely right. And the operator did not change the slack part of the notifications

github-actions[bot] commented 1 year ago

This issue has gone 30 days without any activity and meets the project’s definition of 'stale'. This will be auto-closed if there is no new activity over the next 60 days. If the issue is still relevant and active, you can simply comment with a 'bump' to keep it open. Thanks for keeping our repository healthy!