Skip to content

Commit 9bff932

Browse files
Yumasiclaude
andcommitted
discovery: remove EnabledByDefault from CRD, use nil tri-state
Remove EnabledByDefault from the CRD and instead use the nil/false/true tri-state on Enabled: - Enabled=nil → not configured by user (operator may auto-enable later) - Enabled=false → explicit user opt-out - Enabled=true → explicit user opt-in (system-probe fallback allowed) The fallback distinction is preserved: userExplicitlyEnabled is only true when Enabled=*true, so a future operator auto-enable path (nil) would still use the conservative sleep-infinity fallback. Enabled is intentionally not defaulted to false so that nil remains distinguishable from an explicit opt-out. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent eed2e42 commit 9bff932

15 files changed

Lines changed: 159 additions & 225 deletions

api/datadoghq/v2alpha1/datadogagent_types.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -647,13 +647,6 @@ type ServiceDiscoveryFeatureConfig struct {
647647
// +optional
648648
Enabled *bool `json:"enabled,omitempty"`
649649

650-
// Indicates that the operator enabled this feature automatically rather than in response to an
651-
// explicit user setting. When true, if `system-probe-lite` is unavailable, the container falls
652-
// back to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on
653-
// older agent images. This field is managed by the operator and must not be set by users.
654-
// +optional
655-
EnabledByDefault *bool `json:"enabledByDefault,omitempty"`
656-
657650
// DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.
658651
// +deprecated
659652
// +optional

api/datadoghq/v2alpha1/zz_generated.deepcopy.go

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/v1/datadoghq.com_datadogagentinternals.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,13 +2503,6 @@ spec:
25032503
Enables the service discovery check.
25042504
Default: false
25052505
type: boolean
2506-
enabledByDefault:
2507-
description: |-
2508-
Indicates that the operator enabled this feature automatically rather than in response to an
2509-
explicit user setting. When true, if `system-probe-lite` is unavailable, the container falls
2510-
back to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on
2511-
older agent images. This field is managed by the operator and must not be set by users.
2512-
type: boolean
25132506
networkStats:
25142507
description: 'DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.'
25152508
properties:
@@ -10942,13 +10935,6 @@ spec:
1094210935
Enables the service discovery check.
1094310936
Default: false
1094410937
type: boolean
10945-
enabledByDefault:
10946-
description: |-
10947-
Indicates that the operator enabled this feature automatically rather than in response to an
10948-
explicit user setting. When true, if `system-probe-lite` is unavailable, the container falls
10949-
back to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on
10950-
older agent images. This field is managed by the operator and must not be set by users.
10951-
type: boolean
1095210938
networkStats:
1095310939
description: 'DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.'
1095410940
properties:

config/crd/bases/v1/datadoghq.com_datadogagentinternals_v1alpha1.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2603,10 +2603,6 @@
26032603
"description": "Enables the service discovery check.\nDefault: false",
26042604
"type": "boolean"
26052605
},
2606-
"enabledByDefault": {
2607-
"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.",
2608-
"type": "boolean"
2609-
},
26102606
"networkStats": {
26112607
"additionalProperties": false,
26122608
"description": "DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.",
@@ -10776,10 +10772,6 @@
1077610772
"description": "Enables the service discovery check.\nDefault: false",
1077710773
"type": "boolean"
1077810774
},
10779-
"enabledByDefault": {
10780-
"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.",
10781-
"type": "boolean"
10782-
},
1078310775
"networkStats": {
1078410776
"additionalProperties": false,
1078510777
"description": "DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.",

config/crd/bases/v1/datadoghq.com_datadogagentprofiles.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,13 +2503,6 @@ spec:
25032503
Enables the service discovery check.
25042504
Default: false
25052505
type: boolean
2506-
enabledByDefault:
2507-
description: |-
2508-
Indicates that the operator enabled this feature automatically rather than in response to an
2509-
explicit user setting. When true, if `system-probe-lite` is unavailable, the container falls
2510-
back to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on
2511-
older agent images. This field is managed by the operator and must not be set by users.
2512-
type: boolean
25132506
networkStats:
25142507
description: 'DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.'
25152508
properties:

config/crd/bases/v1/datadoghq.com_datadogagentprofiles_v1alpha1.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2607,10 +2607,6 @@
26072607
"description": "Enables the service discovery check.\nDefault: false",
26082608
"type": "boolean"
26092609
},
2610-
"enabledByDefault": {
2611-
"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.",
2612-
"type": "boolean"
2613-
},
26142610
"networkStats": {
26152611
"additionalProperties": false,
26162612
"description": "DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.",

config/crd/bases/v1/datadoghq.com_datadogagents.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2507,13 +2507,6 @@ spec:
25072507
Enables the service discovery check.
25082508
Default: false
25092509
type: boolean
2510-
enabledByDefault:
2511-
description: |-
2512-
Indicates that the operator enabled this feature automatically rather than in response to an
2513-
explicit user setting. When true, if `system-probe-lite` is unavailable, the container falls
2514-
back to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on
2515-
older agent images. This field is managed by the operator and must not be set by users.
2516-
type: boolean
25172510
networkStats:
25182511
description: 'DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.'
25192512
properties:
@@ -11022,13 +11015,6 @@ spec:
1102211015
Enables the service discovery check.
1102311016
Default: false
1102411017
type: boolean
11025-
enabledByDefault:
11026-
description: |-
11027-
Indicates that the operator enabled this feature automatically rather than in response to an
11028-
explicit user setting. When true, if `system-probe-lite` is unavailable, the container falls
11029-
back to `sleep infinity` rather than `system-probe`, to avoid unexpected resource usage on
11030-
older agent images. This field is managed by the operator and must not be set by users.
11031-
type: boolean
1103211018
networkStats:
1103311019
description: 'DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.'
1103411020
properties:

config/crd/bases/v1/datadoghq.com_datadogagents_v2alpha1.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2603,10 +2603,6 @@
26032603
"description": "Enables the service discovery check.\nDefault: false",
26042604
"type": "boolean"
26052605
},
2606-
"enabledByDefault": {
2607-
"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.",
2608-
"type": "boolean"
2609-
},
26102606
"networkStats": {
26112607
"additionalProperties": false,
26122608
"description": "DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.",
@@ -10869,10 +10865,6 @@
1086910865
"description": "Enables the service discovery check.\nDefault: false",
1087010866
"type": "boolean"
1087110867
},
10872-
"enabledByDefault": {
10873-
"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.",
10874-
"type": "boolean"
10875-
},
1087610868
"networkStats": {
1087710869
"additionalProperties": false,
1087810870
"description": "DEPRECATED: NetworkStats is no longer configurable and will be ignored. Scheduled for removal in v1.28.",

docs/configuration.v2alpha1.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ spec:
202202
| features.sbom.host.analyzers | To use for SBOM collection. |
203203
| features.sbom.host.enabled | Enable this option to activate SBOM collection. Default: false |
204204
| features.serviceDiscovery.enabled | Enables the service discovery check. Default: false |
205-
| 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. |
206205
| features.serviceDiscovery.networkStats.enabled | DEPRECATED: this field is ignored. |
207206
| features.tcpQueueLength.enabled | Enables the TCP queue length eBPF-based check. Default: false |
208207
| features.usm.enabled | Enables Universal Service Monitoring. Default: false |

docs/configuration_public.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,6 @@ spec:
384384
`features.serviceDiscovery.enabled`
385385
: Enables the service discovery check. Default: false
386386

387-
`features.serviceDiscovery.enabledByDefault`
388-
: 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.
389-
390387
`features.serviceDiscovery.networkStats.enabled`
391388
: DEPRECATED: this field is ignored.
392389

0 commit comments

Comments
 (0)