Skip to content

Commit

Permalink
[CONTINT-4437] Add Support for EndpointSlices (DataDog#32104)
Browse files Browse the repository at this point in the history
  • Loading branch information
ewoodthomas authored Dec 20, 2024
1 parent d2c4983 commit 8dae9f9
Show file tree
Hide file tree
Showing 5 changed files with 774 additions and 100 deletions.
1 change: 1 addition & 0 deletions pkg/config/setup/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1673,6 +1673,7 @@ func kubernetes(config pkgconfigmodel.Setup) {
config.BindEnvAndSetDefault("kubelet_cache_pods_duration", 5) // Polling frequency in seconds of the agent to the kubelet "/pods" endpoint
config.BindEnvAndSetDefault("kubelet_listener_polling_interval", 5) // Polling frequency in seconds of the pod watcher to detect new pods/containers (affected by kubelet_cache_pods_duration setting)
config.BindEnvAndSetDefault("kubernetes_collect_metadata_tags", true)
config.BindEnvAndSetDefault("kubernetes_use_endpoint_slices", false)
config.BindEnvAndSetDefault("kubernetes_metadata_tag_update_freq", 60) // Polling frequency of the Agent to the DCA in seconds (gets the local cache if the DCA is disabled)
config.BindEnvAndSetDefault("kubernetes_apiserver_client_timeout", 10)
config.BindEnvAndSetDefault("kubernetes_apiserver_informer_client_timeout", 0)
Expand Down
4 changes: 3 additions & 1 deletion pkg/util/kubernetes/apiserver/controllers/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ func StartControllers(ctx *ControllerContext) k8serrors.Aggregate {
// startMetadataController starts the informers needed for metadata collection.
// The synchronization of the informers is handled by the controller.
func startMetadataController(ctx *ControllerContext, _ chan error) {
useEndpointSlices := pkgconfigsetup.Datadog().GetBool("kubernetes_use_endpoint_slices")
metaController := newMetadataController(
ctx.InformerFactory.Core().V1().Endpoints(),
ctx.InformerFactory,
ctx.WorkloadMeta,
useEndpointSlices,
)
go metaController.run(ctx.StopCh)
}
Expand Down
Loading

0 comments on commit 8dae9f9

Please sign in to comment.