Adding renotifyStatuses and removed deprecated Locked in monitors
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? https://github.com/DataDog/datadog-operator/issues/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 datadogperator 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:
Checklist
- [x] PR has at least one valid label:
bug,enhancement,refactoring,documentation,tooling, and/ordependencies - [ ] PR has a milestone or the
qa/skip-qalabel
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 55.04%. Comparing base (
7ece56c) to head (1caaa37).
Additional details and impacted files
@@ 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%) |
:arrow_up: |
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%) |
:arrow_up: |
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 7ece56c...1caaa37. Read the comment docs.