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

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

Merged
merged 2 commits into from
Jan 9, 2024

Conversation

liliyadd
Copy link
Collaborator

@liliyadd liliyadd commented Jan 4, 2024

What does this PR do?

When installing Datadog Agent, set INSTALL ID, INSTALL TIME and INSTALL TYPE env variables on Cluster Agent and Trace Agent. This information will be used to map first traces sent by the application to a specific Agent installation to build time-to-value KPI. https://docs.google.com/document/d/14vsrCbnAKnXmJAkacX9I6jKPGKmxsq0PKUb3dfiZpWE/edit?pli=1#heading=h.8d3o7vtyu1y1

Same logic for Helm is in https://github.com/DataDog/helm-charts/pull/1263/files#diff-a80e1dad44b204bcd75eed397bfa4a89f944c4804baebd6f988392094f058dc2

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

  • Unit tests.
  • Dev image of the Operator to install Agent in staging cluster.

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

@liliyadd liliyadd added the enhancement New feature or request label Jan 4, 2024
@liliyadd liliyadd added this to the v1.5.0 milestone Jan 4, 2024
@liliyadd liliyadd requested a review from CharlyF January 4, 2024 21:52
@liliyadd liliyadd requested review from a team as code owners January 4, 2024 21:52
@@ -307,6 +307,25 @@ func envVarsForCoreAgent(dda metav1.Object) []corev1.EnvVar {
return append(envs, commonEnvVars(dda)...)
}

func envVarsForTraceAgent(dda metav1.Object) []corev1.EnvVar {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is this the right place to add new env variables for Trace Agent? Looks like this codepath is not covered by agent_test.go tests.

Comment on lines 149 to 160
{
Name: apicommon.DDInstrumentationInstallId,
Value: component.AgentInstallId,
},
{
Name: apicommon.DDInstrumentationInstallTime,
Value: component.AgentInstallTime,
},
{
Name: apicommon.DDInstrumentationInstallType,
Value: component.DefaultAgentInstallType,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these env vars not specific to the APM use case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, they power APM Onboarding KPIs. Should we add APM prefix to the env variable names?

Copy link
Contributor

Choose a reason for hiding this comment

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

no need if the instrumentation metadata naming has a consensus across product (wherever that could be used). However, the pattern we use is to only add feature specific configs when the config is enabled. In this case, APM and the cluster agent are not yet tied (will be done in SSI), so while it'd be best to add more logic, this should be OK since we want APM to enabled.

@@ -17,6 +17,8 @@ import (
apicommon "github.com/DataDog/datadog-operator/apis/datadoghq/common"
apicommonv1 "github.com/DataDog/datadog-operator/apis/datadoghq/common/v1"
apiutils "github.com/DataDog/datadog-operator/apis/utils"

//componentutils "github.com/DataDog/datadog-operator/pkg/controllers/datadogagent/component"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
//componentutils "github.com/DataDog/datadog-operator/pkg/controllers/datadogagent/component"

@@ -27,6 +30,15 @@ import (

const (
localServiceDefaultMinimumVersion = "1.22-0"

DefaultAgentInstallType = "k8s_manual"
Copy link
Contributor

Choose a reason for hiding this comment

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

how is this used? shouldn't this be datadog-operator?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's used for communicating to the Trace Agent the injection type that the client libraries were injected with. k8s_manual is the default value and will be overwritten by Cluster Agent if either local library injection or Single Step Instrumentation occur.

We only need this env variable until Agent 7.51.0 version is released, since we already merged a change to Trace Agent to handle properly the case when install type is not set.

@liliyadd liliyadd requested a review from CharlyF January 9, 2024 16:17
@CharlyF CharlyF modified the milestones: v1.5.0, v1.4.0 Jan 9, 2024
@CharlyF CharlyF merged commit cd7b487 into main Jan 9, 2024
19 checks passed
@CharlyF CharlyF deleted the liliya.belaus/set-onboarding-kpi-env-variables branch January 9, 2024 17:08
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
…env variables (#1034)

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

* Add APM prefix to env variables
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
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants