Skip to content

.spec.monitorIDs are not an elegant approach #2145

@drewwells

Description

@drewwells

If you try to setup a SLO with a monitor, it's not currently possible to deploy that in a single pass of Helm. The SLO is expected to read the output of the monitor status object in order to link the two. This is a difficult task in a helm installation. There are many examples of how to link objects in k8s that follow a more k8s friendly approach.

As an example, I suggest using a label/selector approach. The monitor would have a label ie. `project=acme,app=frontend'. The SLO would find this with a selector https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

apiVersion: datadoghq.com/v1alpha1
kind: DatadogSLO
metadata:
  name: example
  namespace: {{ .Release.Namespace }}
spec:
  monitorSelector:
    project: acme
    app: frontend
...
status:
  monitor: 
  - acmeMonitor
  - monitor2...

This would then make it possible for the SLO controller to watch the monitors, read the status field and inject the required information in the SLO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    chart/datadog-operatorThis issue or pull request is related to the datadog-operator chartenhancementNew feature or requestpending

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions