Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[datadogmonitor] Adding renotifyStatuses and indicating Locked is deprecated #1259

Merged
merged 8 commits into from
Jul 15, 2024

Conversation

Eokye
Copy link
Contributor

@Eokye Eokye commented Jul 2, 2024

What does this PR do?

A brief description of the change being made with this pull request.

Added renotifyStatuses to the operator's datadog monitor field, and removed Locked which is deprecated

Motivation

What inspired you to submit this pull request?
#1216

Additional Notes

Anything else we should know when reviewing?

Minimum Agent Versions

Are there minimum versions of the Datadog Agent and/or Cluster Agent required?

  • Agent: vX.Y.Z
  • Cluster Agent: vX.Y.Z

Describe your test plan

Write there any instructions and details you may have to test your PR.
I used this manifest after enabling datadogmonitors in datadog operator manager.yaml file:

apiVersion: datadoghq.com/v1alpha1
kind: DatadogMonitor
metadata:
  name: datadog-monitor-test
spec:
  query: "avg(last_10m):avg:system.disk.in_use{*} by {host} > 0.5"
  type: "metric alert"
  name: "Test monitor made from DatadogMonitor"
  message: "We are running out of disk space!"
  tags:
    - "test:datadog"
  options:
    renotifyInterval: 1
    renotifyOccurrences: 3
    renotifyStatuses:
      - "alert"
      - "warn"
    groupbySimpleMonitor: false

The renotifyStatuses were subsequently shown on the monitor's settings:
image

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label

@Eokye Eokye added the enhancement New feature or request label Jul 2, 2024
@Eokye Eokye requested review from a team as code owners July 2, 2024 16:36
@codecov-commenter
Copy link

codecov-commenter commented Jul 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.04%. Comparing base (7ece56c) to head (1caaa37).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1259   +/-   ##
=======================================
  Coverage   55.03%   55.04%           
=======================================
  Files         243      243           
  Lines       28165    28168    +3     
=======================================
+ Hits        15502    15505    +3     
  Misses      11785    11785           
  Partials      878      878           
Flag Coverage Δ
unittests 55.04% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
apis/datadoghq/v1alpha1/datadogmonitor_types.go 100.00% <ø> (ø)
controllers/datadogmonitor/monitor.go 68.87% <100.00%> (+0.48%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ece56c...1caaa37. Read the comment docs.

@celenechang celenechang added this to the v1.8.0 milestone Jul 12, 2024
@levan-m levan-m added enhancement New feature or request and removed enhancement New feature or request labels Jul 12, 2024
@celenechang celenechang changed the title Adding renotifyStatuses and removed deprecated Locked in monitors [datadogmonitor] Adding renotifyStatuses and indicating Locked is deprecated Jul 15, 2024
@Eokye Eokye merged commit f9aef45 into main Jul 15, 2024
19 checks passed
@Eokye Eokye deleted the eokye/renotifyStatuses branch July 15, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants