Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions api/datadoghq/v2alpha1/datadogagent_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -643,17 +643,9 @@ type USMFeatureConfig struct {
// ServiceDiscoveryFeatureConfig configures the service discovery check feature.
type ServiceDiscoveryFeatureConfig struct {
// Enables the service discovery check.
// Default: false
// +optional
Enabled *bool `json:"enabled,omitempty"`

// Indicates that the operator enabled this feature automatically rather than in response to an
// explicit user setting. When true, if `system-probe-lite` is unavailable, the container falls
// back to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on
// older agent images. This field is managed by the operator and must not be set by users.
// +optional
EnabledByDefault *bool `json:"enabledByDefault,omitempty"`

// DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.
// +deprecated
// +optional
Expand Down
5 changes: 0 additions & 5 deletions api/datadoghq/v2alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 2 additions & 20 deletions config/crd/bases/v1/datadoghq.com_datadogagentinternals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2484,16 +2484,7 @@ spec:
description: ServiceDiscovery
properties:
enabled:
description: |-
Enables the service discovery check.
Default: false
type: boolean
enabledByDefault:
description: |-
Indicates that the operator enabled this feature automatically rather than in response to an
explicit user setting. When true, if `system-probe-lite` is unavailable, the container falls
back to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on
older agent images. This field is managed by the operator and must not be set by users.
description: Enables the service discovery check.
type: boolean
networkStats:
description: 'DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.'
Expand Down Expand Up @@ -10908,16 +10899,7 @@ spec:
description: ServiceDiscovery
properties:
enabled:
description: |-
Enables the service discovery check.
Default: false
type: boolean
enabledByDefault:
description: |-
Indicates that the operator enabled this feature automatically rather than in response to an
explicit user setting. When true, if `system-probe-lite` is unavailable, the container falls
back to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on
older agent images. This field is managed by the operator and must not be set by users.
description: Enables the service discovery check.
type: boolean
networkStats:
description: 'DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2585,11 +2585,7 @@
"description": "ServiceDiscovery",
"properties": {
"enabled": {
"description": "Enables the service discovery check.\nDefault: false",
"type": "boolean"
},
"enabledByDefault": {
"description": "Indicates that the operator enabled this feature automatically rather than in response to an\nexplicit user setting. When true, if `system-probe-lite` is unavailable, the container falls\nback to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on\nolder agent images. This field is managed by the operator and must not be set by users.",
"description": "Enables the service discovery check.",
"type": "boolean"
},
"networkStats": {
Expand Down Expand Up @@ -10743,11 +10739,7 @@
"description": "ServiceDiscovery",
"properties": {
"enabled": {
"description": "Enables the service discovery check.\nDefault: false",
"type": "boolean"
},
"enabledByDefault": {
"description": "Indicates that the operator enabled this feature automatically rather than in response to an\nexplicit user setting. When true, if `system-probe-lite` is unavailable, the container falls\nback to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on\nolder agent images. This field is managed by the operator and must not be set by users.",
"description": "Enables the service discovery check.",
"type": "boolean"
},
"networkStats": {
Expand Down
11 changes: 1 addition & 10 deletions config/crd/bases/v1/datadoghq.com_datadogagentprofiles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2484,16 +2484,7 @@ spec:
description: ServiceDiscovery
properties:
enabled:
description: |-
Enables the service discovery check.
Default: false
type: boolean
enabledByDefault:
description: |-
Indicates that the operator enabled this feature automatically rather than in response to an
explicit user setting. When true, if `system-probe-lite` is unavailable, the container falls
back to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on
older agent images. This field is managed by the operator and must not be set by users.
description: Enables the service discovery check.
type: boolean
networkStats:
description: 'DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2589,11 +2589,7 @@
"description": "ServiceDiscovery",
"properties": {
"enabled": {
"description": "Enables the service discovery check.\nDefault: false",
"type": "boolean"
},
"enabledByDefault": {
"description": "Indicates that the operator enabled this feature automatically rather than in response to an\nexplicit user setting. When true, if `system-probe-lite` is unavailable, the container falls\nback to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on\nolder agent images. This field is managed by the operator and must not be set by users.",
"description": "Enables the service discovery check.",
"type": "boolean"
},
"networkStats": {
Expand Down
22 changes: 2 additions & 20 deletions config/crd/bases/v1/datadoghq.com_datadogagents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2484,16 +2484,7 @@ spec:
description: ServiceDiscovery
properties:
enabled:
description: |-
Enables the service discovery check.
Default: false
type: boolean
enabledByDefault:
description: |-
Indicates that the operator enabled this feature automatically rather than in response to an
explicit user setting. When true, if `system-probe-lite` is unavailable, the container falls
back to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on
older agent images. This field is managed by the operator and must not be set by users.
description: Enables the service discovery check.
type: boolean
networkStats:
description: 'DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.'
Expand Down Expand Up @@ -10958,16 +10949,7 @@ spec:
description: ServiceDiscovery
properties:
enabled:
description: |-
Enables the service discovery check.
Default: false
type: boolean
enabledByDefault:
description: |-
Indicates that the operator enabled this feature automatically rather than in response to an
explicit user setting. When true, if `system-probe-lite` is unavailable, the container falls
back to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on
older agent images. This field is managed by the operator and must not be set by users.
description: Enables the service discovery check.
type: boolean
networkStats:
description: 'DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.'
Expand Down
12 changes: 2 additions & 10 deletions config/crd/bases/v1/datadoghq.com_datadogagents_v2alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2585,11 +2585,7 @@
"description": "ServiceDiscovery",
"properties": {
"enabled": {
"description": "Enables the service discovery check.\nDefault: false",
"type": "boolean"
},
"enabledByDefault": {
"description": "Indicates that the operator enabled this feature automatically rather than in response to an\nexplicit user setting. When true, if `system-probe-lite` is unavailable, the container falls\nback to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on\nolder agent images. This field is managed by the operator and must not be set by users.",
"description": "Enables the service discovery check.",
"type": "boolean"
},
"networkStats": {
Expand Down Expand Up @@ -10808,11 +10804,7 @@
"description": "ServiceDiscovery",
"properties": {
"enabled": {
"description": "Enables the service discovery check.\nDefault: false",
"type": "boolean"
},
"enabledByDefault": {
"description": "Indicates that the operator enabled this feature automatically rather than in response to an\nexplicit user setting. When true, if `system-probe-lite` is unavailable, the container falls\nback to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on\nolder agent images. This field is managed by the operator and must not be set by users.",
"description": "Enables the service discovery check.",
"type": "boolean"
},
"networkStats": {
Expand Down
3 changes: 1 addition & 2 deletions docs/configuration.v2alpha1.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ spec:
| features.sbom.enabled | Enable this option to activate SBOM collection. Default: false |
| features.sbom.host.analyzers | To use for SBOM collection. |
| features.sbom.host.enabled | Enable this option to activate SBOM collection. Default: false |
| features.serviceDiscovery.enabled | Enables the service discovery check. Default: false |
| features.serviceDiscovery.enabledByDefault | Indicates that the operator enabled this feature automatically rather than in response to an explicit user setting. When true, if `system-probe-lite` is unavailable, the container falls back to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on older agent images. This field is managed by the operator and must not be set by users. |
| features.serviceDiscovery.enabled | Enables the service discovery check. |
| features.serviceDiscovery.networkStats.enabled | DEPRECATED: this field is ignored. |
| features.tcpQueueLength.enabled | Enables the TCP queue length eBPF-based check. Default: false |
| features.usm.enabled | Enables Universal Service Monitoring. Default: false |
Expand Down
5 changes: 1 addition & 4 deletions docs/configuration_public.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,7 @@ spec:
: Enable this option to activate SBOM collection. Default: false

`features.serviceDiscovery.enabled`
: Enables the service discovery check. Default: false

`features.serviceDiscovery.enabledByDefault`
: Indicates that the operator enabled this feature automatically rather than in response to an explicit user setting. When true, if `system-probe-lite` is unavailable, the container falls back to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on older agent images. This field is managed by the operator and must not be set by users.
: Enables the service discovery check.

`features.serviceDiscovery.networkStats.enabled`
: DEPRECATED: this field is ignored.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ const (

defaultGPUMonitoringEnabled bool = false

defaultServiceDiscoveryEnabled bool = false
defaultServiceDiscoveryEnabledByDefault bool = false

defaultAPMEnabled bool = true
defaultAPMHostPortEnabled bool = false
defaultAPMHostPort int32 = 8126
Expand Down Expand Up @@ -303,12 +300,8 @@ func defaultFeaturesConfig(ddaSpec *v2alpha1.DatadogAgentSpec) {
if ddaSpec.Features.ServiceDiscovery == nil {
ddaSpec.Features.ServiceDiscovery = &v2alpha1.ServiceDiscoveryFeatureConfig{}
}
apiutils.DefaultBooleanIfUnset(&ddaSpec.Features.ServiceDiscovery.EnabledByDefault, defaultServiceDiscoveryEnabledByDefault)
// Only default Enabled to false when not enabled-by-default, so that Enabled=nil remains
// distinguishable from Enabled=false (explicit user opt-out) when EnabledByDefault=true.
if !apiutils.BoolValue(ddaSpec.Features.ServiceDiscovery.EnabledByDefault) {
apiutils.DefaultBooleanIfUnset(&ddaSpec.Features.ServiceDiscovery.Enabled, defaultServiceDiscoveryEnabled)
}
// Intentionally leave ServiceDiscovery.Enabled unset to preserve the distinction
// between an explicit opt-out (false) and future operator-driven default enablement (nil).

// GPU monitoring feature
if ddaSpec.Features.GPU == nil {
Expand Down
Loading
Loading