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

feat: add NotificationPresetName to monitor options #1001

Merged

Conversation

bakayolo
Copy link
Contributor

@bakayolo bakayolo commented Nov 25, 2023

What does this PR do?

In datadog, we have the possibility to toggle the "Content display in notification" for every monitor. This PR enables this.

More info in https://docs.datadoghq.com/monitors/notify/#toggle-additional-content

Motivation

#815

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?

Nop

Describe your test plan

Write there any instructions and details you may have to test your PR.

  1. Apply the new CRDs
  2. Pass the option notificationPresetName with one of show_all, hide_query, hide_handles, hide_all.

It will set the right value in the field "Content display in notification" of the monitor. Tested on my clusters using bappr/datatog-operator:test-0 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

In datadog, we have the possibility to toggle the "Content display in notification" for every monitor. This PR enables this.

More info in https://docs.datadoghq.com/monitors/notify/#toggle-additional-content
@bakayolo bakayolo requested review from a team as code owners November 25, 2023 03:37
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request does not contain a valid label. Please add one of the following labels: bug, enhancement, refactoring, documentation, tooling, dependencies

@bakayolo
Copy link
Contributor Author

Can someone with the right permission add the label enhancement to this PR plz? :-)

Copy link
Contributor

@celenechang celenechang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate the contribution, thank you. Just made one small comment

apis/datadoghq/v1alpha1/datadogmonitor_types.go Outdated Show resolved Hide resolved
@celenechang celenechang added this to the v1.4.0 milestone Dec 4, 2023
@codecov-commenter
Copy link

codecov-commenter commented Dec 4, 2023

Codecov Report

Merging #1001 (d7a289f) into main (8e2f8f8) will increase coverage by 0.01%.
Report is 4 commits behind head on main.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1001      +/-   ##
==========================================
+ Coverage   57.13%   57.15%   +0.01%     
==========================================
  Files         164      164              
  Lines       19584    19592       +8     
==========================================
+ Hits        11190    11198       +8     
  Misses       7741     7741              
  Partials      653      653              
Flag Coverage Δ
unittests 57.15% <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 66.29% <100.00%> (+0.56%) ⬆️

... and 1 file with indirect coverage changes


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 8e2f8f8...d7a289f. Read the comment docs.

Co-authored-by: Celene <[email protected]>
@bakayolo
Copy link
Contributor Author

bakayolo commented Dec 5, 2023

Thanks @celenechang. Approved your change!

@celenechang
Copy link
Contributor

Sorry after a second look I made more suggestions. Thanks again

@bakayolo
Copy link
Contributor Author

bakayolo commented Dec 5, 2023

@celenechang are you sure you wanna make these changes? I used the same naming as datadogV1 -> datadogV1.MonitorOptionsNotificationPresets.

@celenechang
Copy link
Contributor

@bakayolo appreciate you pointing that out - I had a quick chat with the monitors API team and decided the singular form for the enum would have been preferred, but since it is a breaking change they are not going to change it for now. On the Operator side, let's go ahead and use the singular DatadogMonitorOptionsNotificationPreset instead of DatadogMonitorOptionsNotificationPresets

@bakayolo
Copy link
Contributor Author

bakayolo commented Dec 6, 2023

@celenechang makes sense. All commited.

Copy link
Contributor

@celenechang celenechang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again!

@celenechang celenechang merged commit 7bd890e into DataDog:main Dec 7, 2023
7 checks passed
@bakayolo bakayolo deleted the bakayolo/feat/notification-preset-name branch December 7, 2023 18:11
khewonc added a commit that referenced this pull request Feb 9, 2024
* [defaulting/images] Set default version of agent and cluster agent to `7.49.0` (#968)

* Allow enabling SBOM collection for host and container images (#836)

* Allow enabling SBOM collection for host and container images

* small fixes and add test

* actually add test

* address comments

---------

Co-authored-by: Celene <[email protected]>

* Bump go-grpc to 1.56.3 (#970)

* Remove SecurityContextConstraints parameter and references (#977)

* remove references to scc creation

* rm commented tests

* rm unused functions

* Add GCR EU and Asia registries with auto defaulting (#978)

* update examples for v2 datadogagent (#980)

* Update default Agent/DCA version to 7.49.1 (#984)

7.49.1 has just been released. it would be great to have it in Operator 1.3.0

* Enable by default container-image collection (#983)

We want to enabled container-image collection by default. it will
be the case from agent 7.50.0. But in Operator 1.3.0, the Agent is
defaulted to 7.49.0 since 7.50.0 is not yet released.

This commit set the envvar DD_CONTAINER_IMAGE_ENABLED=true by default
in the NodeAgent's "agent" container.

* [Docs] OpenShift docs update (#991)

* OpenShift docs update
* Resize and crop image

* Update integrations_autodiscovery.md (#985)

* Update integrations_autodiscovery.md

Noticed a mismatched https://a.cl.ly/qGuYnRqn

* Update integrations_autodiscovery.md

Updated the configuration to match the graph title "Use the spec.override.nodeAgent.extraConfd.configDataMap" -> "Use the spec.override.clusterAgent.extraConfd.configDataMap"
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
 global:
   credentials:
     apiKey: "<DATADOG_API_KEY>"
     appKey: "<DATADOG_APP_KEY>"
 override:
  nodeAgent:
    extraConfd:
      configDataMap:
        http_check.yaml: |-
          init_config:
          instances:
            - url: "http://%%host%%"
              name: "My service"

* update patch-bundle script to include spec.replaces field in bundle (#990)

* Support `CanaryAutoPauseMaxSlowStartDuration` option (#997)

* Add support for max slow start duration config param

* Update max slow start arg name to include auto pause

* fixup! Update max slow start arg name to include auto pause

* update datadog-api-client-go (#986)

* update datadog-api-client-go

* update license

* add dependabot.yaml file (#989)

* Update boilerplate text (#1005)

* Enabling APM by default (#1006)

* feat: add NotificationPresetName to monitor options (#1001)

* feat: add NotificationPresetName to monitor options

In datadog, we have the possibility to toggle the "Content display in notification" for every monitor. This PR enables this.

More info in https://docs.datadoghq.com/monitors/notify/#toggle-additional-content

* pr review

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* update generated files

---------

Co-authored-by: Celene <[email protected]>

* [APMON-406] Set Datadog namespace env variable on Cluster Agent (#1012)

* [APMON-406] Set env variable for the Datadog resources namespace

* DCA namespace resources env var added for V2

---------

Co-authored-by: julia-elsammak <[email protected]>
Co-authored-by: Julia-elsammak <[email protected]>

* Add `createdAd`, `support` fields to bundle CSV file (#1018)

* Add createAd, support fields to bundle CSV file

* Update hack/patch-bundle.sh

Co-authored-by: Celene <[email protected]>

* Update hack/patch-bundle.sh

Co-authored-by: Celene <[email protected]>

---------

Co-authored-by: Celene <[email protected]>

* update feature default values and tests (#1015)

* Provide default probe handler httpGet values if not configured in override (#998)

* Provide default readinessProbe.httpGet if not configured

* apply review suggestions

* Update bundles to match 1.3.0 release (#1019)

* Fix patch_bundle.sh `spec.replaces` formatting (#1026)

* [defaulting/images] Update agents to 7.50.1 (#1029)

* ContainerProcessStrategy, allow running non-privileged agents in one container (#921)

* Add mono-container config to CRD

* mono-container support implementation

* livecontainer feature unit test and factory fix

* cluster checks feature test; change in CC feature

* ksm feature test; change in the feature

* APM feature test

* OTLP feature test; feature change

* add ManageMonoContainerNodeAgent to ebpfcheck feature

* add ManageMonoContainerNodeAgent to process discovery feature

* Basic global_test.go test, minor refactor

* feature factory test

* Refactor tests to reduce direct use of mono-container CRD

* Change CRD and container name

* Rename ManageMonoContainerNodeAgent -> ManageMultiProcessNodeAgent

* Updates after merge; doc update

* refactor around ApplyGlobalSettings

* drop 'mono' from naming, comments

* Update tests with trace agent enabled by default now

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update controllers/datadogagent/feature/admissioncontroller/feature.go

Co-authored-by: Celene <[email protected]>

* Update controllers/datadogagent/feature/factory.go

Co-authored-by: Celene <[email protected]>

* updates on PR feedback

* updates on PR feedback

* Update apis/datadoghq/v2alpha1/test/builder.go

Co-authored-by: Celene <[email protected]>

* rename UsesMultiProcessContainer

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Charly Fontaine <[email protected]>

* PR feedback updates

---------

Co-authored-by: Celene <[email protected]>
Co-authored-by: Charly Fontaine <[email protected]>

* [defaulting/images] Update agents to 7.50.2 (#1033)

* [Onboarding telemetry] Set install id, install time and install type env variables (#1034)

* [Onboarding telemetry] Set install id, install time and install type env variables

* Add APM prefix to env variables

* [CECO-570] Add operator introspection (#817)

* Add operator introspection

* [defaulting/images] Update agents to 7.50.3 (#1038)

* [gitlab] Add nightly operator and operator_check jobs (#1039)

* add gitlab job to release nightly image

* update non-privileged to unprivileged (#1040)

* Change gcp to gke (#1046)

* Mount host files for proper os detection in SBOMs (#1044)

* [gitlab] auto push nightly image (#1048)

* [introspection] Fix override name combining (#1049)

* Fix override name combining

* Add a test for the change

---------

Co-authored-by: Levan Machablishvili <[email protected]>

* [override/podtemplatespec] Merge affinities (#1004) (#1052)

Co-authored-by: David Ortiz <[email protected]>

* [gitlab] update runners for build jobs (#1056)

* test image build jobs

* rename docker-push-ci

* test fix (#1057)

* update monocontainer config (#1059)

* update monocontainer config

* Update docs/configuration.v2alpha1.md

Co-authored-by: May Lee <[email protected]>

* fix generated file

* fix missed var names

---------

Co-authored-by: May Lee <[email protected]>

* Correct a malformed example command in installation.md (#1066)

Fix installation document

* Fix errors for tests and allow both introspection and profiles to run

---------

Co-authored-by: Jennifer Chen <[email protected]>
Co-authored-by: Sylvain Baubeau <[email protected]>
Co-authored-by: Celene <[email protected]>
Co-authored-by: Charly Fontaine <[email protected]>
Co-authored-by: Vincent Boulineau <[email protected]>
Co-authored-by: Cedric Lamoriniere <[email protected]>
Co-authored-by: tbavelier <[email protected]>
Co-authored-by: Julia-elsammak <[email protected]>
Co-authored-by: bakayolo <[email protected]>
Co-authored-by: Liliya Belaus <[email protected]>
Co-authored-by: julia-elsammak <[email protected]>
Co-authored-by: levan-m <[email protected]>
Co-authored-by: Fanny Jiang <[email protected]>
Co-authored-by: David Ortiz <[email protected]>
Co-authored-by: Levan Machablishvili <[email protected]>
Co-authored-by: May Lee <[email protected]>
Co-authored-by: David Goffredo <[email protected]>
khewonc added a commit that referenced this pull request Feb 21, 2024
* Add profiles base (#966)

* Add profiles base

* Fix ci + apply renames in crd

* Add profile sample manifest (#974)

* First version to support Agent profiles (#976)

* [override/daemonset] Apply only if it's not empty

* [config/rbac/role] Add profiles

* Add basic version of profiles manager

* [controllers/datadogagent] Create DaemonSets according to profiles

* [override/container] Don't override resource if not specified

* [agentprofile] Add support for overrides in all node agent containers

* [agentprofile] Take into account namespace when setting DS name

* [profiles] Add label to DaemonSets (#1000)

* [profiles] Add integration tests (#992)

* [datadogagent_controller_v2_test] Make create/delete funcs more generic

* Add integration tests for agent profiles

* [profiles] Handle conflicts between profiles (#999)

* Profile manifest validation (#973)

* Add profile validation

* At least one container resource must be defined

* Remove redundant assert and update boilerplate text

* [profiles] Create default profile with a node anti affinity (#1002)

* [profiles] Add support for profiles with multiple affinity requirements

* [profiles] Cleanup integration tests

* [datadogagent/finalizer] Delete profile labels

Also fixes the finalizer handle so that it no longer ignores errors.

* [override/podtemplatespec] Merge affinities (#1004)

* [profiles] Add pod-antiaffinity to agent pods (#1003)

This avoids scheduling multiple agent pods of different profiles on the same
node during rollouts.

* Validate dap (#1028)

* [profiles] Add support for EDS (#1032)

* Add node informer and Node store (#1025)

* add node informer

* add nodestore tests and update existing profiles tests

* refactor profile store

* update tests

* update func name

* cleanup

* apply review suggestions

* apply review suggestions

* tests need fixing

* Simplify nodestore

* Review suggestions

---------

Co-authored-by: khewonc <[email protected]>

* [profiles] Fix Watches call for Profiles (#1043)

* [profiles] Fix container resources override with 0 (#1054)

* Bump k8s dependencies to 0.24.x (#1064)

* Bump k8s dependencies

These should have been updated when operator-sdk was updated to 1.23.0 according to the docs:
https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.23.0/

* Run "make manifests"

* Update licenses

* [profiles] Reduce mem usage in pods cleanup (#1065)

* [profiles] Replace custom node cache with k8s client one (#1070)

* [profiles] Replace custom node cache with k8s client one

* [profiles/test] Use random node names to avoid conflicts between tests

* [profiles/test] Use Eventually() when checking node labels

* [profiles/test] Comment node labels part for now

* Change node labels to use dap ns-name format (#1071)

* [profiles] Merge main and fix issues from test (#1078)

* [defaulting/images] Set default version of agent and cluster agent to `7.49.0` (#968)

* Allow enabling SBOM collection for host and container images (#836)

* Allow enabling SBOM collection for host and container images

* small fixes and add test

* actually add test

* address comments

---------

Co-authored-by: Celene <[email protected]>

* Bump go-grpc to 1.56.3 (#970)

* Remove SecurityContextConstraints parameter and references (#977)

* remove references to scc creation

* rm commented tests

* rm unused functions

* Add GCR EU and Asia registries with auto defaulting (#978)

* update examples for v2 datadogagent (#980)

* Update default Agent/DCA version to 7.49.1 (#984)

7.49.1 has just been released. it would be great to have it in Operator 1.3.0

* Enable by default container-image collection (#983)

We want to enabled container-image collection by default. it will
be the case from agent 7.50.0. But in Operator 1.3.0, the Agent is
defaulted to 7.49.0 since 7.50.0 is not yet released.

This commit set the envvar DD_CONTAINER_IMAGE_ENABLED=true by default
in the NodeAgent's "agent" container.

* [Docs] OpenShift docs update (#991)

* OpenShift docs update
* Resize and crop image

* Update integrations_autodiscovery.md (#985)

* Update integrations_autodiscovery.md

Noticed a mismatched https://a.cl.ly/qGuYnRqn

* Update integrations_autodiscovery.md

Updated the configuration to match the graph title "Use the spec.override.nodeAgent.extraConfd.configDataMap" -> "Use the spec.override.clusterAgent.extraConfd.configDataMap"
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
 global:
   credentials:
     apiKey: "<DATADOG_API_KEY>"
     appKey: "<DATADOG_APP_KEY>"
 override:
  nodeAgent:
    extraConfd:
      configDataMap:
        http_check.yaml: |-
          init_config:
          instances:
            - url: "http://%%host%%"
              name: "My service"

* update patch-bundle script to include spec.replaces field in bundle (#990)

* Support `CanaryAutoPauseMaxSlowStartDuration` option (#997)

* Add support for max slow start duration config param

* Update max slow start arg name to include auto pause

* fixup! Update max slow start arg name to include auto pause

* update datadog-api-client-go (#986)

* update datadog-api-client-go

* update license

* add dependabot.yaml file (#989)

* Update boilerplate text (#1005)

* Enabling APM by default (#1006)

* feat: add NotificationPresetName to monitor options (#1001)

* feat: add NotificationPresetName to monitor options

In datadog, we have the possibility to toggle the "Content display in notification" for every monitor. This PR enables this.

More info in https://docs.datadoghq.com/monitors/notify/#toggle-additional-content

* pr review

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* update generated files

---------

Co-authored-by: Celene <[email protected]>

* [APMON-406] Set Datadog namespace env variable on Cluster Agent (#1012)

* [APMON-406] Set env variable for the Datadog resources namespace

* DCA namespace resources env var added for V2

---------

Co-authored-by: julia-elsammak <[email protected]>
Co-authored-by: Julia-elsammak <[email protected]>

* Add `createdAd`, `support` fields to bundle CSV file (#1018)

* Add createAd, support fields to bundle CSV file

* Update hack/patch-bundle.sh

Co-authored-by: Celene <[email protected]>

* Update hack/patch-bundle.sh

Co-authored-by: Celene <[email protected]>

---------

Co-authored-by: Celene <[email protected]>

* update feature default values and tests (#1015)

* Provide default probe handler httpGet values if not configured in override (#998)

* Provide default readinessProbe.httpGet if not configured

* apply review suggestions

* Update bundles to match 1.3.0 release (#1019)

* Fix patch_bundle.sh `spec.replaces` formatting (#1026)

* [defaulting/images] Update agents to 7.50.1 (#1029)

* ContainerProcessStrategy, allow running non-privileged agents in one container (#921)

* Add mono-container config to CRD

* mono-container support implementation

* livecontainer feature unit test and factory fix

* cluster checks feature test; change in CC feature

* ksm feature test; change in the feature

* APM feature test

* OTLP feature test; feature change

* add ManageMonoContainerNodeAgent to ebpfcheck feature

* add ManageMonoContainerNodeAgent to process discovery feature

* Basic global_test.go test, minor refactor

* feature factory test

* Refactor tests to reduce direct use of mono-container CRD

* Change CRD and container name

* Rename ManageMonoContainerNodeAgent -> ManageMultiProcessNodeAgent

* Updates after merge; doc update

* refactor around ApplyGlobalSettings

* drop 'mono' from naming, comments

* Update tests with trace agent enabled by default now

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update controllers/datadogagent/feature/admissioncontroller/feature.go

Co-authored-by: Celene <[email protected]>

* Update controllers/datadogagent/feature/factory.go

Co-authored-by: Celene <[email protected]>

* updates on PR feedback

* updates on PR feedback

* Update apis/datadoghq/v2alpha1/test/builder.go

Co-authored-by: Celene <[email protected]>

* rename UsesMultiProcessContainer

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Charly Fontaine <[email protected]>

* PR feedback updates

---------

Co-authored-by: Celene <[email protected]>
Co-authored-by: Charly Fontaine <[email protected]>

* [defaulting/images] Update agents to 7.50.2 (#1033)

* [Onboarding telemetry] Set install id, install time and install type env variables (#1034)

* [Onboarding telemetry] Set install id, install time and install type env variables

* Add APM prefix to env variables

* [CECO-570] Add operator introspection (#817)

* Add operator introspection

* [defaulting/images] Update agents to 7.50.3 (#1038)

* [gitlab] Add nightly operator and operator_check jobs (#1039)

* add gitlab job to release nightly image

* update non-privileged to unprivileged (#1040)

* Change gcp to gke (#1046)

* Mount host files for proper os detection in SBOMs (#1044)

* [gitlab] auto push nightly image (#1048)

* [introspection] Fix override name combining (#1049)

* Fix override name combining

* Add a test for the change

---------

Co-authored-by: Levan Machablishvili <[email protected]>

* [override/podtemplatespec] Merge affinities (#1004) (#1052)

Co-authored-by: David Ortiz <[email protected]>

* [gitlab] update runners for build jobs (#1056)

* test image build jobs

* rename docker-push-ci

* test fix (#1057)

* update monocontainer config (#1059)

* update monocontainer config

* Update docs/configuration.v2alpha1.md

Co-authored-by: May Lee <[email protected]>

* fix generated file

* fix missed var names

---------

Co-authored-by: May Lee <[email protected]>

* Correct a malformed example command in installation.md (#1066)

Fix installation document

* Fix errors for tests and allow both introspection and profiles to run

---------

Co-authored-by: Jennifer Chen <[email protected]>
Co-authored-by: Sylvain Baubeau <[email protected]>
Co-authored-by: Celene <[email protected]>
Co-authored-by: Charly Fontaine <[email protected]>
Co-authored-by: Vincent Boulineau <[email protected]>
Co-authored-by: Cedric Lamoriniere <[email protected]>
Co-authored-by: tbavelier <[email protected]>
Co-authored-by: Julia-elsammak <[email protected]>
Co-authored-by: bakayolo <[email protected]>
Co-authored-by: Liliya Belaus <[email protected]>
Co-authored-by: julia-elsammak <[email protected]>
Co-authored-by: levan-m <[email protected]>
Co-authored-by: Fanny Jiang <[email protected]>
Co-authored-by: David Ortiz <[email protected]>
Co-authored-by: Levan Machablishvili <[email protected]>
Co-authored-by: May Lee <[email protected]>
Co-authored-by: David Goffredo <[email protected]>

---------

Co-authored-by: khewonc <[email protected]>
Co-authored-by: Fanny Jiang <[email protected]>
Co-authored-by: Jennifer Chen <[email protected]>
Co-authored-by: Sylvain Baubeau <[email protected]>
Co-authored-by: Celene <[email protected]>
Co-authored-by: Charly Fontaine <[email protected]>
Co-authored-by: Vincent Boulineau <[email protected]>
Co-authored-by: Cedric Lamoriniere <[email protected]>
Co-authored-by: tbavelier <[email protected]>
Co-authored-by: Julia-elsammak <[email protected]>
Co-authored-by: bakayolo <[email protected]>
Co-authored-by: Liliya Belaus <[email protected]>
Co-authored-by: julia-elsammak <[email protected]>
Co-authored-by: levan-m <[email protected]>
Co-authored-by: Levan Machablishvili <[email protected]>
Co-authored-by: May Lee <[email protected]>
Co-authored-by: David Goffredo <[email protected]>
khewonc added a commit that referenced this pull request Feb 22, 2024
* Add profiles base (#966)

* Add profiles base

* Fix ci + apply renames in crd

* Add profile sample manifest (#974)

* First version to support Agent profiles (#976)

* [override/daemonset] Apply only if it's not empty

* [config/rbac/role] Add profiles

* Add basic version of profiles manager

* [controllers/datadogagent] Create DaemonSets according to profiles

* [override/container] Don't override resource if not specified

* [agentprofile] Add support for overrides in all node agent containers

* [agentprofile] Take into account namespace when setting DS name

* [profiles] Add label to DaemonSets (#1000)

* [profiles] Add integration tests (#992)

* [datadogagent_controller_v2_test] Make create/delete funcs more generic

* Add integration tests for agent profiles

* [profiles] Handle conflicts between profiles (#999)

* Profile manifest validation (#973)

* Add profile validation

* At least one container resource must be defined

* Remove redundant assert and update boilerplate text

* [profiles] Create default profile with a node anti affinity (#1002)

* [profiles] Add support for profiles with multiple affinity requirements

* [profiles] Cleanup integration tests

* [datadogagent/finalizer] Delete profile labels

Also fixes the finalizer handle so that it no longer ignores errors.

* [override/podtemplatespec] Merge affinities (#1004)

* [profiles] Add pod-antiaffinity to agent pods (#1003)

This avoids scheduling multiple agent pods of different profiles on the same
node during rollouts.

* Validate dap (#1028)

* [profiles] Add support for EDS (#1032)

* Add node informer and Node store (#1025)

* add node informer

* add nodestore tests and update existing profiles tests

* refactor profile store

* update tests

* update func name

* cleanup

* apply review suggestions

* apply review suggestions

* tests need fixing

* Simplify nodestore

* Review suggestions

---------

Co-authored-by: khewonc <[email protected]>

* [profiles] Fix Watches call for Profiles (#1043)

* [profiles] Fix container resources override with 0 (#1054)

* Bump k8s dependencies to 0.24.x (#1064)

* Bump k8s dependencies

These should have been updated when operator-sdk was updated to 1.23.0 according to the docs:
https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.23.0/

* Run "make manifests"

* Update licenses

* [profiles] Reduce mem usage in pods cleanup (#1065)

* [profiles] Replace custom node cache with k8s client one (#1070)

* [profiles] Replace custom node cache with k8s client one

* [profiles/test] Use random node names to avoid conflicts between tests

* [profiles/test] Use Eventually() when checking node labels

* [profiles/test] Comment node labels part for now

* Change node labels to use dap ns-name format (#1071)

* [profiles] Merge main and fix issues from test (#1078)

* [defaulting/images] Set default version of agent and cluster agent to `7.49.0` (#968)

* Allow enabling SBOM collection for host and container images (#836)

* Allow enabling SBOM collection for host and container images

* small fixes and add test

* actually add test

* address comments

---------

Co-authored-by: Celene <[email protected]>

* Bump go-grpc to 1.56.3 (#970)

* Remove SecurityContextConstraints parameter and references (#977)

* remove references to scc creation

* rm commented tests

* rm unused functions

* Add GCR EU and Asia registries with auto defaulting (#978)

* update examples for v2 datadogagent (#980)

* Update default Agent/DCA version to 7.49.1 (#984)

7.49.1 has just been released. it would be great to have it in Operator 1.3.0

* Enable by default container-image collection (#983)

We want to enabled container-image collection by default. it will
be the case from agent 7.50.0. But in Operator 1.3.0, the Agent is
defaulted to 7.49.0 since 7.50.0 is not yet released.

This commit set the envvar DD_CONTAINER_IMAGE_ENABLED=true by default
in the NodeAgent's "agent" container.

* [Docs] OpenShift docs update (#991)

* OpenShift docs update
* Resize and crop image

* Update integrations_autodiscovery.md (#985)

* Update integrations_autodiscovery.md

Noticed a mismatched https://a.cl.ly/qGuYnRqn

* Update integrations_autodiscovery.md

Updated the configuration to match the graph title "Use the spec.override.nodeAgent.extraConfd.configDataMap" -> "Use the spec.override.clusterAgent.extraConfd.configDataMap"
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
 global:
   credentials:
     apiKey: "<DATADOG_API_KEY>"
     appKey: "<DATADOG_APP_KEY>"
 override:
  nodeAgent:
    extraConfd:
      configDataMap:
        http_check.yaml: |-
          init_config:
          instances:
            - url: "http://%%host%%"
              name: "My service"

* update patch-bundle script to include spec.replaces field in bundle (#990)

* Support `CanaryAutoPauseMaxSlowStartDuration` option (#997)

* Add support for max slow start duration config param

* Update max slow start arg name to include auto pause

* fixup! Update max slow start arg name to include auto pause

* update datadog-api-client-go (#986)

* update datadog-api-client-go

* update license

* add dependabot.yaml file (#989)

* Update boilerplate text (#1005)

* Enabling APM by default (#1006)

* feat: add NotificationPresetName to monitor options (#1001)

* feat: add NotificationPresetName to monitor options

In datadog, we have the possibility to toggle the "Content display in notification" for every monitor. This PR enables this.

More info in https://docs.datadoghq.com/monitors/notify/#toggle-additional-content

* pr review

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* update generated files

---------

Co-authored-by: Celene <[email protected]>

* [APMON-406] Set Datadog namespace env variable on Cluster Agent (#1012)

* [APMON-406] Set env variable for the Datadog resources namespace

* DCA namespace resources env var added for V2

---------

Co-authored-by: julia-elsammak <[email protected]>
Co-authored-by: Julia-elsammak <[email protected]>

* Add `createdAd`, `support` fields to bundle CSV file (#1018)

* Add createAd, support fields to bundle CSV file

* Update hack/patch-bundle.sh

Co-authored-by: Celene <[email protected]>

* Update hack/patch-bundle.sh

Co-authored-by: Celene <[email protected]>

---------

Co-authored-by: Celene <[email protected]>

* update feature default values and tests (#1015)

* Provide default probe handler httpGet values if not configured in override (#998)

* Provide default readinessProbe.httpGet if not configured

* apply review suggestions

* Update bundles to match 1.3.0 release (#1019)

* Fix patch_bundle.sh `spec.replaces` formatting (#1026)

* [defaulting/images] Update agents to 7.50.1 (#1029)

* ContainerProcessStrategy, allow running non-privileged agents in one container (#921)

* Add mono-container config to CRD

* mono-container support implementation

* livecontainer feature unit test and factory fix

* cluster checks feature test; change in CC feature

* ksm feature test; change in the feature

* APM feature test

* OTLP feature test; feature change

* add ManageMonoContainerNodeAgent to ebpfcheck feature

* add ManageMonoContainerNodeAgent to process discovery feature

* Basic global_test.go test, minor refactor

* feature factory test

* Refactor tests to reduce direct use of mono-container CRD

* Change CRD and container name

* Rename ManageMonoContainerNodeAgent -> ManageMultiProcessNodeAgent

* Updates after merge; doc update

* refactor around ApplyGlobalSettings

* drop 'mono' from naming, comments

* Update tests with trace agent enabled by default now

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update controllers/datadogagent/feature/admissioncontroller/feature.go

Co-authored-by: Celene <[email protected]>

* Update controllers/datadogagent/feature/factory.go

Co-authored-by: Celene <[email protected]>

* updates on PR feedback

* updates on PR feedback

* Update apis/datadoghq/v2alpha1/test/builder.go

Co-authored-by: Celene <[email protected]>

* rename UsesMultiProcessContainer

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Charly Fontaine <[email protected]>

* PR feedback updates

---------

Co-authored-by: Celene <[email protected]>
Co-authored-by: Charly Fontaine <[email protected]>

* [defaulting/images] Update agents to 7.50.2 (#1033)

* [Onboarding telemetry] Set install id, install time and install type env variables (#1034)

* [Onboarding telemetry] Set install id, install time and install type env variables

* Add APM prefix to env variables

* [CECO-570] Add operator introspection (#817)

* Add operator introspection

* [defaulting/images] Update agents to 7.50.3 (#1038)

* [gitlab] Add nightly operator and operator_check jobs (#1039)

* add gitlab job to release nightly image

* update non-privileged to unprivileged (#1040)

* Change gcp to gke (#1046)

* Mount host files for proper os detection in SBOMs (#1044)

* [gitlab] auto push nightly image (#1048)

* [introspection] Fix override name combining (#1049)

* Fix override name combining

* Add a test for the change

---------

Co-authored-by: Levan Machablishvili <[email protected]>

* [override/podtemplatespec] Merge affinities (#1004) (#1052)

Co-authored-by: David Ortiz <[email protected]>

* [gitlab] update runners for build jobs (#1056)

* test image build jobs

* rename docker-push-ci

* test fix (#1057)

* update monocontainer config (#1059)

* update monocontainer config

* Update docs/configuration.v2alpha1.md

Co-authored-by: May Lee <[email protected]>

* fix generated file

* fix missed var names

---------

Co-authored-by: May Lee <[email protected]>

* Correct a malformed example command in installation.md (#1066)

Fix installation document

* Fix errors for tests and allow both introspection and profiles to run

---------

Co-authored-by: Jennifer Chen <[email protected]>
Co-authored-by: Sylvain Baubeau <[email protected]>
Co-authored-by: Celene <[email protected]>
Co-authored-by: Charly Fontaine <[email protected]>
Co-authored-by: Vincent Boulineau <[email protected]>
Co-authored-by: Cedric Lamoriniere <[email protected]>
Co-authored-by: tbavelier <[email protected]>
Co-authored-by: Julia-elsammak <[email protected]>
Co-authored-by: bakayolo <[email protected]>
Co-authored-by: Liliya Belaus <[email protected]>
Co-authored-by: julia-elsammak <[email protected]>
Co-authored-by: levan-m <[email protected]>
Co-authored-by: Fanny Jiang <[email protected]>
Co-authored-by: David Ortiz <[email protected]>
Co-authored-by: Levan Machablishvili <[email protected]>
Co-authored-by: May Lee <[email protected]>
Co-authored-by: David Goffredo <[email protected]>

* Refactor introspection

* Fix default provider only case

---------

Co-authored-by: David Ortiz <[email protected]>
Co-authored-by: Fanny Jiang <[email protected]>
Co-authored-by: Jennifer Chen <[email protected]>
Co-authored-by: Sylvain Baubeau <[email protected]>
Co-authored-by: Celene <[email protected]>
Co-authored-by: Charly Fontaine <[email protected]>
Co-authored-by: Vincent Boulineau <[email protected]>
Co-authored-by: Cedric Lamoriniere <[email protected]>
Co-authored-by: tbavelier <[email protected]>
Co-authored-by: Julia-elsammak <[email protected]>
Co-authored-by: bakayolo <[email protected]>
Co-authored-by: Liliya Belaus <[email protected]>
Co-authored-by: julia-elsammak <[email protected]>
Co-authored-by: levan-m <[email protected]>
Co-authored-by: Levan Machablishvili <[email protected]>
Co-authored-by: May Lee <[email protected]>
Co-authored-by: David Goffredo <[email protected]>
mftoure pushed a commit that referenced this pull request Oct 3, 2024
* feat: add NotificationPresetName to monitor options

In datadog, we have the possibility to toggle the "Content display in notification" for every monitor. This PR enables this.

More info in https://docs.datadoghq.com/monitors/notify/#toggle-additional-content

* pr review

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* update generated files

---------

Co-authored-by: Celene <[email protected]>
mftoure pushed a commit that referenced this pull request Oct 3, 2024
* Add profiles base (#966)

* Add profiles base

* Fix ci + apply renames in crd

* Add profile sample manifest (#974)

* First version to support Agent profiles (#976)

* [override/daemonset] Apply only if it's not empty

* [config/rbac/role] Add profiles

* Add basic version of profiles manager

* [controllers/datadogagent] Create DaemonSets according to profiles

* [override/container] Don't override resource if not specified

* [agentprofile] Add support for overrides in all node agent containers

* [agentprofile] Take into account namespace when setting DS name

* [profiles] Add label to DaemonSets (#1000)

* [profiles] Add integration tests (#992)

* [datadogagent_controller_v2_test] Make create/delete funcs more generic

* Add integration tests for agent profiles

* [profiles] Handle conflicts between profiles (#999)

* Profile manifest validation (#973)

* Add profile validation

* At least one container resource must be defined

* Remove redundant assert and update boilerplate text

* [profiles] Create default profile with a node anti affinity (#1002)

* [profiles] Add support for profiles with multiple affinity requirements

* [profiles] Cleanup integration tests

* [datadogagent/finalizer] Delete profile labels

Also fixes the finalizer handle so that it no longer ignores errors.

* [override/podtemplatespec] Merge affinities (#1004)

* [profiles] Add pod-antiaffinity to agent pods (#1003)

This avoids scheduling multiple agent pods of different profiles on the same
node during rollouts.

* Validate dap (#1028)

* [profiles] Add support for EDS (#1032)

* Add node informer and Node store (#1025)

* add node informer

* add nodestore tests and update existing profiles tests

* refactor profile store

* update tests

* update func name

* cleanup

* apply review suggestions

* apply review suggestions

* tests need fixing

* Simplify nodestore

* Review suggestions

---------

Co-authored-by: khewonc <[email protected]>

* [profiles] Fix Watches call for Profiles (#1043)

* [profiles] Fix container resources override with 0 (#1054)

* Bump k8s dependencies to 0.24.x (#1064)

* Bump k8s dependencies

These should have been updated when operator-sdk was updated to 1.23.0 according to the docs:
https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.23.0/

* Run "make manifests"

* Update licenses

* [profiles] Reduce mem usage in pods cleanup (#1065)

* [profiles] Replace custom node cache with k8s client one (#1070)

* [profiles] Replace custom node cache with k8s client one

* [profiles/test] Use random node names to avoid conflicts between tests

* [profiles/test] Use Eventually() when checking node labels

* [profiles/test] Comment node labels part for now

* Change node labels to use dap ns-name format (#1071)

* [profiles] Merge main and fix issues from test (#1078)

* [defaulting/images] Set default version of agent and cluster agent to `7.49.0` (#968)

* Allow enabling SBOM collection for host and container images (#836)

* Allow enabling SBOM collection for host and container images

* small fixes and add test

* actually add test

* address comments

---------

Co-authored-by: Celene <[email protected]>

* Bump go-grpc to 1.56.3 (#970)

* Remove SecurityContextConstraints parameter and references (#977)

* remove references to scc creation

* rm commented tests

* rm unused functions

* Add GCR EU and Asia registries with auto defaulting (#978)

* update examples for v2 datadogagent (#980)

* Update default Agent/DCA version to 7.49.1 (#984)

7.49.1 has just been released. it would be great to have it in Operator 1.3.0

* Enable by default container-image collection (#983)

We want to enabled container-image collection by default. it will
be the case from agent 7.50.0. But in Operator 1.3.0, the Agent is
defaulted to 7.49.0 since 7.50.0 is not yet released.

This commit set the envvar DD_CONTAINER_IMAGE_ENABLED=true by default
in the NodeAgent's "agent" container.

* [Docs] OpenShift docs update (#991)

* OpenShift docs update
* Resize and crop image

* Update integrations_autodiscovery.md (#985)

* Update integrations_autodiscovery.md

Noticed a mismatched https://a.cl.ly/qGuYnRqn

* Update integrations_autodiscovery.md

Updated the configuration to match the graph title "Use the spec.override.nodeAgent.extraConfd.configDataMap" -> "Use the spec.override.clusterAgent.extraConfd.configDataMap"
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
 global:
   credentials:
     apiKey: "<DATADOG_API_KEY>"
     appKey: "<DATADOG_APP_KEY>"
 override:
  nodeAgent:
    extraConfd:
      configDataMap:
        http_check.yaml: |-
          init_config:
          instances:
            - url: "http://%%host%%"
              name: "My service"

* update patch-bundle script to include spec.replaces field in bundle (#990)

* Support `CanaryAutoPauseMaxSlowStartDuration` option (#997)

* Add support for max slow start duration config param

* Update max slow start arg name to include auto pause

* fixup! Update max slow start arg name to include auto pause

* update datadog-api-client-go (#986)

* update datadog-api-client-go

* update license

* add dependabot.yaml file (#989)

* Update boilerplate text (#1005)

* Enabling APM by default (#1006)

* feat: add NotificationPresetName to monitor options (#1001)

* feat: add NotificationPresetName to monitor options

In datadog, we have the possibility to toggle the "Content display in notification" for every monitor. This PR enables this.

More info in https://docs.datadoghq.com/monitors/notify/#toggle-additional-content

* pr review

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* update generated files

---------

Co-authored-by: Celene <[email protected]>

* [APMON-406] Set Datadog namespace env variable on Cluster Agent (#1012)

* [APMON-406] Set env variable for the Datadog resources namespace

* DCA namespace resources env var added for V2

---------

Co-authored-by: julia-elsammak <[email protected]>
Co-authored-by: Julia-elsammak <[email protected]>

* Add `createdAd`, `support` fields to bundle CSV file (#1018)

* Add createAd, support fields to bundle CSV file

* Update hack/patch-bundle.sh

Co-authored-by: Celene <[email protected]>

* Update hack/patch-bundle.sh

Co-authored-by: Celene <[email protected]>

---------

Co-authored-by: Celene <[email protected]>

* update feature default values and tests (#1015)

* Provide default probe handler httpGet values if not configured in override (#998)

* Provide default readinessProbe.httpGet if not configured

* apply review suggestions

* Update bundles to match 1.3.0 release (#1019)

* Fix patch_bundle.sh `spec.replaces` formatting (#1026)

* [defaulting/images] Update agents to 7.50.1 (#1029)

* ContainerProcessStrategy, allow running non-privileged agents in one container (#921)

* Add mono-container config to CRD

* mono-container support implementation

* livecontainer feature unit test and factory fix

* cluster checks feature test; change in CC feature

* ksm feature test; change in the feature

* APM feature test

* OTLP feature test; feature change

* add ManageMonoContainerNodeAgent to ebpfcheck feature

* add ManageMonoContainerNodeAgent to process discovery feature

* Basic global_test.go test, minor refactor

* feature factory test

* Refactor tests to reduce direct use of mono-container CRD

* Change CRD and container name

* Rename ManageMonoContainerNodeAgent -> ManageMultiProcessNodeAgent

* Updates after merge; doc update

* refactor around ApplyGlobalSettings

* drop 'mono' from naming, comments

* Update tests with trace agent enabled by default now

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update controllers/datadogagent/feature/admissioncontroller/feature.go

Co-authored-by: Celene <[email protected]>

* Update controllers/datadogagent/feature/factory.go

Co-authored-by: Celene <[email protected]>

* updates on PR feedback

* updates on PR feedback

* Update apis/datadoghq/v2alpha1/test/builder.go

Co-authored-by: Celene <[email protected]>

* rename UsesMultiProcessContainer

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Charly Fontaine <[email protected]>

* PR feedback updates

---------

Co-authored-by: Celene <[email protected]>
Co-authored-by: Charly Fontaine <[email protected]>

* [defaulting/images] Update agents to 7.50.2 (#1033)

* [Onboarding telemetry] Set install id, install time and install type env variables (#1034)

* [Onboarding telemetry] Set install id, install time and install type env variables

* Add APM prefix to env variables

* [CECO-570] Add operator introspection (#817)

* Add operator introspection

* [defaulting/images] Update agents to 7.50.3 (#1038)

* [gitlab] Add nightly operator and operator_check jobs (#1039)

* add gitlab job to release nightly image

* update non-privileged to unprivileged (#1040)

* Change gcp to gke (#1046)

* Mount host files for proper os detection in SBOMs (#1044)

* [gitlab] auto push nightly image (#1048)

* [introspection] Fix override name combining (#1049)

* Fix override name combining

* Add a test for the change

---------

Co-authored-by: Levan Machablishvili <[email protected]>

* [override/podtemplatespec] Merge affinities (#1004) (#1052)

Co-authored-by: David Ortiz <[email protected]>

* [gitlab] update runners for build jobs (#1056)

* test image build jobs

* rename docker-push-ci

* test fix (#1057)

* update monocontainer config (#1059)

* update monocontainer config

* Update docs/configuration.v2alpha1.md

Co-authored-by: May Lee <[email protected]>

* fix generated file

* fix missed var names

---------

Co-authored-by: May Lee <[email protected]>

* Correct a malformed example command in installation.md (#1066)

Fix installation document

* Fix errors for tests and allow both introspection and profiles to run

---------

Co-authored-by: Jennifer Chen <[email protected]>
Co-authored-by: Sylvain Baubeau <[email protected]>
Co-authored-by: Celene <[email protected]>
Co-authored-by: Charly Fontaine <[email protected]>
Co-authored-by: Vincent Boulineau <[email protected]>
Co-authored-by: Cedric Lamoriniere <[email protected]>
Co-authored-by: tbavelier <[email protected]>
Co-authored-by: Julia-elsammak <[email protected]>
Co-authored-by: bakayolo <[email protected]>
Co-authored-by: Liliya Belaus <[email protected]>
Co-authored-by: julia-elsammak <[email protected]>
Co-authored-by: levan-m <[email protected]>
Co-authored-by: Fanny Jiang <[email protected]>
Co-authored-by: David Ortiz <[email protected]>
Co-authored-by: Levan Machablishvili <[email protected]>
Co-authored-by: May Lee <[email protected]>
Co-authored-by: David Goffredo <[email protected]>

---------

Co-authored-by: khewonc <[email protected]>
Co-authored-by: Fanny Jiang <[email protected]>
Co-authored-by: Jennifer Chen <[email protected]>
Co-authored-by: Sylvain Baubeau <[email protected]>
Co-authored-by: Celene <[email protected]>
Co-authored-by: Charly Fontaine <[email protected]>
Co-authored-by: Vincent Boulineau <[email protected]>
Co-authored-by: Cedric Lamoriniere <[email protected]>
Co-authored-by: tbavelier <[email protected]>
Co-authored-by: Julia-elsammak <[email protected]>
Co-authored-by: bakayolo <[email protected]>
Co-authored-by: Liliya Belaus <[email protected]>
Co-authored-by: julia-elsammak <[email protected]>
Co-authored-by: levan-m <[email protected]>
Co-authored-by: Levan Machablishvili <[email protected]>
Co-authored-by: May Lee <[email protected]>
Co-authored-by: David Goffredo <[email protected]>
mftoure pushed a commit that referenced this pull request Oct 3, 2024
* Add profiles base (#966)

* Add profiles base

* Fix ci + apply renames in crd

* Add profile sample manifest (#974)

* First version to support Agent profiles (#976)

* [override/daemonset] Apply only if it's not empty

* [config/rbac/role] Add profiles

* Add basic version of profiles manager

* [controllers/datadogagent] Create DaemonSets according to profiles

* [override/container] Don't override resource if not specified

* [agentprofile] Add support for overrides in all node agent containers

* [agentprofile] Take into account namespace when setting DS name

* [profiles] Add label to DaemonSets (#1000)

* [profiles] Add integration tests (#992)

* [datadogagent_controller_v2_test] Make create/delete funcs more generic

* Add integration tests for agent profiles

* [profiles] Handle conflicts between profiles (#999)

* Profile manifest validation (#973)

* Add profile validation

* At least one container resource must be defined

* Remove redundant assert and update boilerplate text

* [profiles] Create default profile with a node anti affinity (#1002)

* [profiles] Add support for profiles with multiple affinity requirements

* [profiles] Cleanup integration tests

* [datadogagent/finalizer] Delete profile labels

Also fixes the finalizer handle so that it no longer ignores errors.

* [override/podtemplatespec] Merge affinities (#1004)

* [profiles] Add pod-antiaffinity to agent pods (#1003)

This avoids scheduling multiple agent pods of different profiles on the same
node during rollouts.

* Validate dap (#1028)

* [profiles] Add support for EDS (#1032)

* Add node informer and Node store (#1025)

* add node informer

* add nodestore tests and update existing profiles tests

* refactor profile store

* update tests

* update func name

* cleanup

* apply review suggestions

* apply review suggestions

* tests need fixing

* Simplify nodestore

* Review suggestions

---------

Co-authored-by: khewonc <[email protected]>

* [profiles] Fix Watches call for Profiles (#1043)

* [profiles] Fix container resources override with 0 (#1054)

* Bump k8s dependencies to 0.24.x (#1064)

* Bump k8s dependencies

These should have been updated when operator-sdk was updated to 1.23.0 according to the docs:
https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.23.0/

* Run "make manifests"

* Update licenses

* [profiles] Reduce mem usage in pods cleanup (#1065)

* [profiles] Replace custom node cache with k8s client one (#1070)

* [profiles] Replace custom node cache with k8s client one

* [profiles/test] Use random node names to avoid conflicts between tests

* [profiles/test] Use Eventually() when checking node labels

* [profiles/test] Comment node labels part for now

* Change node labels to use dap ns-name format (#1071)

* [profiles] Merge main and fix issues from test (#1078)

* [defaulting/images] Set default version of agent and cluster agent to `7.49.0` (#968)

* Allow enabling SBOM collection for host and container images (#836)

* Allow enabling SBOM collection for host and container images

* small fixes and add test

* actually add test

* address comments

---------

Co-authored-by: Celene <[email protected]>

* Bump go-grpc to 1.56.3 (#970)

* Remove SecurityContextConstraints parameter and references (#977)

* remove references to scc creation

* rm commented tests

* rm unused functions

* Add GCR EU and Asia registries with auto defaulting (#978)

* update examples for v2 datadogagent (#980)

* Update default Agent/DCA version to 7.49.1 (#984)

7.49.1 has just been released. it would be great to have it in Operator 1.3.0

* Enable by default container-image collection (#983)

We want to enabled container-image collection by default. it will
be the case from agent 7.50.0. But in Operator 1.3.0, the Agent is
defaulted to 7.49.0 since 7.50.0 is not yet released.

This commit set the envvar DD_CONTAINER_IMAGE_ENABLED=true by default
in the NodeAgent's "agent" container.

* [Docs] OpenShift docs update (#991)

* OpenShift docs update
* Resize and crop image

* Update integrations_autodiscovery.md (#985)

* Update integrations_autodiscovery.md

Noticed a mismatched https://a.cl.ly/qGuYnRqn

* Update integrations_autodiscovery.md

Updated the configuration to match the graph title "Use the spec.override.nodeAgent.extraConfd.configDataMap" -> "Use the spec.override.clusterAgent.extraConfd.configDataMap"
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
 global:
   credentials:
     apiKey: "<DATADOG_API_KEY>"
     appKey: "<DATADOG_APP_KEY>"
 override:
  nodeAgent:
    extraConfd:
      configDataMap:
        http_check.yaml: |-
          init_config:
          instances:
            - url: "http://%%host%%"
              name: "My service"

* update patch-bundle script to include spec.replaces field in bundle (#990)

* Support `CanaryAutoPauseMaxSlowStartDuration` option (#997)

* Add support for max slow start duration config param

* Update max slow start arg name to include auto pause

* fixup! Update max slow start arg name to include auto pause

* update datadog-api-client-go (#986)

* update datadog-api-client-go

* update license

* add dependabot.yaml file (#989)

* Update boilerplate text (#1005)

* Enabling APM by default (#1006)

* feat: add NotificationPresetName to monitor options (#1001)

* feat: add NotificationPresetName to monitor options

In datadog, we have the possibility to toggle the "Content display in notification" for every monitor. This PR enables this.

More info in https://docs.datadoghq.com/monitors/notify/#toggle-additional-content

* pr review

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* Update datadogmonitor_types.go

Co-authored-by: Celene <[email protected]>

* update generated files

---------

Co-authored-by: Celene <[email protected]>

* [APMON-406] Set Datadog namespace env variable on Cluster Agent (#1012)

* [APMON-406] Set env variable for the Datadog resources namespace

* DCA namespace resources env var added for V2

---------

Co-authored-by: julia-elsammak <[email protected]>
Co-authored-by: Julia-elsammak <[email protected]>

* Add `createdAd`, `support` fields to bundle CSV file (#1018)

* Add createAd, support fields to bundle CSV file

* Update hack/patch-bundle.sh

Co-authored-by: Celene <[email protected]>

* Update hack/patch-bundle.sh

Co-authored-by: Celene <[email protected]>

---------

Co-authored-by: Celene <[email protected]>

* update feature default values and tests (#1015)

* Provide default probe handler httpGet values if not configured in override (#998)

* Provide default readinessProbe.httpGet if not configured

* apply review suggestions

* Update bundles to match 1.3.0 release (#1019)

* Fix patch_bundle.sh `spec.replaces` formatting (#1026)

* [defaulting/images] Update agents to 7.50.1 (#1029)

* ContainerProcessStrategy, allow running non-privileged agents in one container (#921)

* Add mono-container config to CRD

* mono-container support implementation

* livecontainer feature unit test and factory fix

* cluster checks feature test; change in CC feature

* ksm feature test; change in the feature

* APM feature test

* OTLP feature test; feature change

* add ManageMonoContainerNodeAgent to ebpfcheck feature

* add ManageMonoContainerNodeAgent to process discovery feature

* Basic global_test.go test, minor refactor

* feature factory test

* Refactor tests to reduce direct use of mono-container CRD

* Change CRD and container name

* Rename ManageMonoContainerNodeAgent -> ManageMultiProcessNodeAgent

* Updates after merge; doc update

* refactor around ApplyGlobalSettings

* drop 'mono' from naming, comments

* Update tests with trace agent enabled by default now

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Celene <[email protected]>

* Update controllers/datadogagent/feature/admissioncontroller/feature.go

Co-authored-by: Celene <[email protected]>

* Update controllers/datadogagent/feature/factory.go

Co-authored-by: Celene <[email protected]>

* updates on PR feedback

* updates on PR feedback

* Update apis/datadoghq/v2alpha1/test/builder.go

Co-authored-by: Celene <[email protected]>

* rename UsesMultiProcessContainer

* Update apis/datadoghq/v2alpha1/datadogagent_types.go

Co-authored-by: Charly Fontaine <[email protected]>

* PR feedback updates

---------

Co-authored-by: Celene <[email protected]>
Co-authored-by: Charly Fontaine <[email protected]>

* [defaulting/images] Update agents to 7.50.2 (#1033)

* [Onboarding telemetry] Set install id, install time and install type env variables (#1034)

* [Onboarding telemetry] Set install id, install time and install type env variables

* Add APM prefix to env variables

* [CECO-570] Add operator introspection (#817)

* Add operator introspection

* [defaulting/images] Update agents to 7.50.3 (#1038)

* [gitlab] Add nightly operator and operator_check jobs (#1039)

* add gitlab job to release nightly image

* update non-privileged to unprivileged (#1040)

* Change gcp to gke (#1046)

* Mount host files for proper os detection in SBOMs (#1044)

* [gitlab] auto push nightly image (#1048)

* [introspection] Fix override name combining (#1049)

* Fix override name combining

* Add a test for the change

---------

Co-authored-by: Levan Machablishvili <[email protected]>

* [override/podtemplatespec] Merge affinities (#1004) (#1052)

Co-authored-by: David Ortiz <[email protected]>

* [gitlab] update runners for build jobs (#1056)

* test image build jobs

* rename docker-push-ci

* test fix (#1057)

* update monocontainer config (#1059)

* update monocontainer config

* Update docs/configuration.v2alpha1.md

Co-authored-by: May Lee <[email protected]>

* fix generated file

* fix missed var names

---------

Co-authored-by: May Lee <[email protected]>

* Correct a malformed example command in installation.md (#1066)

Fix installation document

* Fix errors for tests and allow both introspection and profiles to run

---------

Co-authored-by: Jennifer Chen <[email protected]>
Co-authored-by: Sylvain Baubeau <[email protected]>
Co-authored-by: Celene <[email protected]>
Co-authored-by: Charly Fontaine <[email protected]>
Co-authored-by: Vincent Boulineau <[email protected]>
Co-authored-by: Cedric Lamoriniere <[email protected]>
Co-authored-by: tbavelier <[email protected]>
Co-authored-by: Julia-elsammak <[email protected]>
Co-authored-by: bakayolo <[email protected]>
Co-authored-by: Liliya Belaus <[email protected]>
Co-authored-by: julia-elsammak <[email protected]>
Co-authored-by: levan-m <[email protected]>
Co-authored-by: Fanny Jiang <[email protected]>
Co-authored-by: David Ortiz <[email protected]>
Co-authored-by: Levan Machablishvili <[email protected]>
Co-authored-by: May Lee <[email protected]>
Co-authored-by: David Goffredo <[email protected]>

* Refactor introspection

* Fix default provider only case

---------

Co-authored-by: David Ortiz <[email protected]>
Co-authored-by: Fanny Jiang <[email protected]>
Co-authored-by: Jennifer Chen <[email protected]>
Co-authored-by: Sylvain Baubeau <[email protected]>
Co-authored-by: Celene <[email protected]>
Co-authored-by: Charly Fontaine <[email protected]>
Co-authored-by: Vincent Boulineau <[email protected]>
Co-authored-by: Cedric Lamoriniere <[email protected]>
Co-authored-by: tbavelier <[email protected]>
Co-authored-by: Julia-elsammak <[email protected]>
Co-authored-by: bakayolo <[email protected]>
Co-authored-by: Liliya Belaus <[email protected]>
Co-authored-by: julia-elsammak <[email protected]>
Co-authored-by: levan-m <[email protected]>
Co-authored-by: Levan Machablishvili <[email protected]>
Co-authored-by: May Lee <[email protected]>
Co-authored-by: David Goffredo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants