Skip to content

[Backport v1.29] Update reason in status for invalid daps#3262

Merged
khewonc merged 1 commit into
v1.29from
backport-3261-to-v1.29
Jul 15, 2026
Merged

[Backport v1.29] Update reason in status for invalid daps#3262
khewonc merged 1 commit into
v1.29from
backport-3261-to-v1.29

Conversation

@dd-octo-sts

@dd-octo-sts dd-octo-sts Bot commented Jul 15, 2026

Copy link
Copy Markdown

Backport 4c971b4 from #3261.


What does this PR do?

Add a reason to the status since the status update is invalid without it:

{"level":"ERROR","ts":"2026-07-15T13:55:32.274Z","logger":"controllers.DatadogAgent","msg":"unable to update profile status","datadogagentprofile":"datadogagentprofile-sample","datadogagentprofile_namespace":"default","error":"DatadogAgentProfile.datadoghq.com \"datadogagentprofile-sample\" is invalid: status.conditions[1].reason: Invalid value: \"\": conditions[1].reason in body should be at least 1 chars long","stacktrace":"github.com/DataDog/datadog-operator/internal/controller/datadogagent.(*Reconciler).reconcileProfiles\n\t/workspace/internal/controller/datadogagent/profile.go:97\ngithub.com/DataDog/datadog-operator/internal/controller/datadogagent.(*Reconciler).reconcileInstanceV3\n\t/workspace/internal/controller/datadogagent/controller_reconcile_v2.go:118\ngithub.com/DataDog/datadog-operator/internal/controller/datadogagent.(*

Motivation

What inspired you to submit this pull request?

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

Create an invalid DAP

  config:
    override:
      nodeAgent:
        nodeSelector:
          disktype: ssd

The operator should reject it: {"level":"ERROR","ts":"2026-07-15T14:17:10.961Z","logger":"controllers.DatadogAgent","msg":"unable to reconcile profile","datadogagentprofile":"invalid-dap","datadogagentprofile_namespace":"default","error":"profile spec is invalid: component node selector override is not supported","stacktrace":...}

The dap status should update:

$ kubectl get dap
NAME          VALID   APPLIED   AGE
invalid-dap   False   Unknown   24m

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
  • All commits are signed (see: signing commits)

@dd-octo-sts dd-octo-sts Bot added bug Something isn't working backport label added by backport action bot label added by backport bot team/container-platform labels Jul 15, 2026
@dd-octo-sts
dd-octo-sts Bot requested a review from a team as a code owner July 15, 2026 14:43
@dd-octo-sts dd-octo-sts Bot added bug Something isn't working backport label added by backport action bot label added by backport bot team/container-platform labels Jul 15, 2026
@dd-octo-sts dd-octo-sts Bot added this to the v1.29.0 milestone Jul 15, 2026
@datadog-official

datadog-official Bot commented Jul 15, 2026

Copy link
Copy Markdown

Pipelines  Code Coverage

Fix all issues with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

DataDog/datadog-operator | build_operator_check_image_arm64   View in Datadog   GitLab

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 46.45% (-0.01%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7ae3e19 | Docs | Datadog PR Page | Give us feedback!

@khewonc
khewonc merged commit 82dc875 into v1.29 Jul 15, 2026
69 of 77 checks passed
@khewonc
khewonc deleted the backport-3261-to-v1.29 branch July 15, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport label added by backport action bot label added by backport bot bug Something isn't working team/container-platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant