DataDog / helm-charts

Helm charts for Datadog products
Apache License 2.0
346 stars 1.01k forks source link

Support to cumulative time windows in CRDs datadogmonitors.datadoghq.com #1004

Open cmotta2016 opened 1 year ago

cmotta2016 commented 1 year ago

Describe what happened: We're attempting to create monitors with cumulative time windows but CRD doesn't support it.

Describe what you expected: The CRD must support the following .spec.options:

    schedulingOptions:
      evaluationWindow:
        dayStarts: "03:00"

Steps to reproduce the issue: Try to create the following Monitor:

apiVersion: datadoghq.com/v1alpha1
kind: DatadogMonitor
metadata:
  name: kubernetes-velero-partial-failed-backup-for-cluster-name
  labels:
    app: datadog-mixin
spec:
  name: "[kubernetes] Velero Partial Failed Backup for Cluster {{cluster_name.name}}"
  query: "sum(current_1d):sum:velero_backup_partial_failure.count{schedule:velero-backup-total-ns} by {cluster_name,kube_namespace,schedule}.as_count() >= 1"
  type: "query alert"
  message: "The last backup for scheduled backup {{schedule.name}} partially failed. "
  priority: 2
  options:
    includeTags: true
    newGroupDelay: 60
    thresholds:
      critical: "1"
    schedulingOptions:
      evaluationWindow:
        dayStarts: "03:00"
  tags:
    - "env:sandbox"
    - "integration:kubernetes"
    - "component:velero"

After created, run the following command and you can see that the schedulingOptions doesn't appear:

k get datadogmonitor kubernetes-velero-partial-failed-backup-for-cluster-cluster-name-name -o yaml  -n namespace

Additional environment details (Operating System, Cloud provider, etc): We're running the following components and versions:

Paul-Weaver commented 5 days ago

Any update on this guys?