Skip to content

Commit

Permalink
rework into ErrorTracking.Mode
Browse files Browse the repository at this point in the history
  • Loading branch information
eloytoro committed Feb 14, 2025
1 parent f1ef4de commit b220604
Show file tree
Hide file tree
Showing 14 changed files with 168 additions and 208 deletions.
28 changes: 8 additions & 20 deletions api/datadoghq/v2alpha1/datadogagent_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,20 @@ type APMFeatureConfig struct {
// +optional
SingleStepInstrumentation *SingleStepInstrumentation `json:"instrumentation,omitempty"`

// ErrorTrackingStandalone contains the configuration for Error Tracking backends standalone.
// ErrorTracking contains the configuration for the Error Tracking product.
// Feature is in beta.
// +optional
ErrorTrackingStandalone *ErrorTrackingStandalone `json:"errorTrackingStandalone,omitempty"`
ErrorTracking *ErrorTracking `json:"errorTracking,omitempty"`
}

// ErrorTrackingStandalone contains the configuration for Error Tracking standalone.
// ErrorTracking contains the configuration for the Error Tracking product.
// +k8s:openapi-gen=true
type ErrorTrackingStandalone struct {
// Enabled enables Error Tracking backend standalone.
// Default: false
type ErrorTracking struct {
// Defines mode of operation of Error Tracking for backend services.
// It can be "disabled", "standalone", or "full".
// Default: disabled
// +optional
Enabled *bool `json:"enabled,omitempty"`
Mode *string `json:"mode,omitempty"`
}

// SingleStepInstrumentation contains the config for the namespaces to target and the library to inject.
Expand Down Expand Up @@ -1408,19 +1409,6 @@ type GlobalConfig struct {
// Default: 'true'
// +optional
RunProcessChecksInCoreAgent *bool `json:"runProcessChecksInCoreAgent,omitempty"`

// CoreAgent contains the settings for the core agent.
// +optional
CoreAgent *CoreAgent `json:"coreAgent,omitempty"`
}

// CoreAgent contains the core agent configuration.
// +k8s:openapi-gen=true
type CoreAgent struct {
// Enabled enables the Core Agent.
// Default: true
// +optional
Enabled *bool `json:"enabled,omitempty"`
}

// DatadogCredentials is a generic structure that holds credentials to access Datadog.
Expand Down
45 changes: 10 additions & 35 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.

33 changes: 6 additions & 27 deletions api/datadoghq/v2alpha1/zz_generated.openapi.go

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

35 changes: 14 additions & 21 deletions config/crd/bases/v1/datadoghq.com_datadogagents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -487,16 +487,17 @@ spec:
Enabled enables Application Performance Monitoring.
Default: true
type: boolean
errorTrackingStandalone:
errorTracking:
description: |-
ErrorTrackingStandalone contains the configuration for Error Tracking backends standalone.
ErrorTracking contains the configuration for the Error Tracking product.
Feature is in beta.
properties:
enabled:
mode:
description: |-
Enabled enables Error Tracking backend standalone.
Default: false
type: boolean
Defines mode of operation of Error Tracking for backend services.
It can be "disabled", "standalone", or "full".
Default: disabled
type: string
type: object
hostPortConfig:
description: |-
Expand Down Expand Up @@ -1657,15 +1658,6 @@ spec:
ContainerStrategy determines whether agents run in a single or multiple containers.
Default: 'optimized'
type: string
coreAgent:
description: CoreAgent contains the settings for the core agent.
properties:
enabled:
description: |-
Enabled enables the Core Agent.
Default: true
type: boolean
type: object
credentials:
description: Credentials defines the Datadog credentials used to submit data to/query data from Datadog.
properties:
Expand Down Expand Up @@ -7391,16 +7383,17 @@ spec:
Enabled enables Application Performance Monitoring.
Default: true
type: boolean
errorTrackingStandalone:
errorTracking:
description: |-
ErrorTrackingStandalone contains the configuration for Error Tracking backends standalone.
ErrorTracking contains the configuration for the Error Tracking product.
Feature is in beta.
properties:
enabled:
mode:
description: |-
Enabled enables Error Tracking backend standalone.
Default: false
type: boolean
Defines mode of operation of Error Tracking for backend services.
It can be "disabled", "standalone", or "full".
Default: disabled
type: string
type: object
hostPortConfig:
description: |-
Expand Down
31 changes: 10 additions & 21 deletions config/crd/bases/v1/datadoghq.com_datadogagents_v2alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -490,13 +490,13 @@
"description": "Enabled enables Application Performance Monitoring.\nDefault: true",
"type": "boolean"
},
"errorTrackingStandalone": {
"errorTracking": {
"additionalProperties": false,
"description": "ErrorTrackingStandalone contains the configuration for Error Tracking backends standalone.\nFeature is in beta.",
"description": "ErrorTracking contains the configuration for the Error Tracking product.\nFeature is in beta.",
"properties": {
"enabled": {
"description": "Enabled enables Error Tracking backend standalone.\nDefault: false",
"type": "boolean"
"mode": {
"description": "Defines mode of operation of Error Tracking for backend services.\nIt can be \"disabled\", \"standalone\", or \"full\".\nDefault: disabled",
"type": "string"
}
},
"type": "object"
Expand Down Expand Up @@ -1748,17 +1748,6 @@
"description": "ContainerStrategy determines whether agents run in a single or multiple containers.\nDefault: 'optimized'",
"type": "string"
},
"coreAgent": {
"additionalProperties": false,
"description": "CoreAgent contains the settings for the core agent.",
"properties": {
"enabled": {
"description": "Enabled enables the Core Agent.\nDefault: true",
"type": "boolean"
}
},
"type": "object"
},
"credentials": {
"additionalProperties": false,
"description": "Credentials defines the Datadog credentials used to submit data to/query data from Datadog.",
Expand Down Expand Up @@ -7337,13 +7326,13 @@
"description": "Enabled enables Application Performance Monitoring.\nDefault: true",
"type": "boolean"
},
"errorTrackingStandalone": {
"errorTracking": {
"additionalProperties": false,
"description": "ErrorTrackingStandalone contains the configuration for Error Tracking backends standalone.\nFeature is in beta.",
"description": "ErrorTracking contains the configuration for the Error Tracking product.\nFeature is in beta.",
"properties": {
"enabled": {
"description": "Enabled enables Error Tracking backend standalone.\nDefault: false",
"type": "boolean"
"mode": {
"description": "Defines mode of operation of Error Tracking for backend services.\nIt can be \"disabled\", \"standalone\", or \"full\".\nDefault: disabled",
"type": "string"
}
},
"type": "object"
Expand Down
3 changes: 1 addition & 2 deletions docs/configuration.v2alpha1.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ spec:
| features.admissionController.validation.enabled | Enables the Admission Controller validation webhook. Default: true |
| features.admissionController.webhookName | WebhookName is a custom name for the MutatingWebhookConfiguration. Default: "datadog-webhook" |
| features.apm.enabled | Enables Application Performance Monitoring. Default: true |
| features.apm.errorTrackingStandalone.enabled | Enables Error Tracking backend standalone. Default: false |
| features.apm.errorTracking.mode | Defines mode of operation of Error Tracking for backend services. It can be "disabled", "standalone", or "full". Default: disabled |
| features.apm.hostPortConfig.enabled | Enables host port configuration |
| features.apm.hostPortConfig.hostPort | Port takes a port number (0 < x < 65536) to expose on the host. (Most containers do not need this.) If HostNetwork is enabled, this value must match the ContainerPort. |
| features.apm.instrumentation.disabledNamespaces | DisabledNamespaces disables injecting the Datadog APM libraries into pods in specific namespaces. |
Expand Down Expand Up @@ -183,7 +183,6 @@ spec:
| global.clusterAgentTokenSecret.secretName | SecretName is the name of the secret. |
| global.clusterName | ClusterName sets a unique cluster name for the deployment to easily scope monitoring data in the Datadog app. |
| global.containerStrategy | ContainerStrategy determines whether agents run in a single or multiple containers. Default: 'optimized' |
| global.coreAgent.enabled | Enables the Core Agent. Default: true |
| global.credentials.apiKey | APIKey configures your Datadog API key. See also: https://app.datadoghq.com/account/settings#agent/kubernetes |
| global.credentials.apiSecret.keyName | KeyName is the key of the secret to use. |
| global.credentials.apiSecret.secretName | SecretName is the name of the secret. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ spec:
features:
apm:
enabled: true
errorTrackingStandalone:
enabled: true
errorTracking:
mode: "standalone"
global:
clusterName: local-k8s
credentials:
Expand Down
Loading

0 comments on commit b220604

Please sign in to comment.