datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

Kubernetes: ConfigMap for leader election should be in the namespace datadog-agent is deployed into

Open sylr opened this issue 8 years ago • 6 comments

The configmap namespace has been hardcoded to the default namespace.

https://github.com/DataDog/datadog-agent/blob/9374c070b6fb2d5c529614ba36af19b2bc27a49b/pkg/util/kubernetes/apiserver/leaderelection/leaderelection.go#L122-L126

This is a regression compared to Agent 5 which creates the configmap in the namespace datadog-agent is deployed into.

sylr avatar Mar 06 '18 16:03 sylr

@sylr you're right. Thank you for this observation.

We should fix this soon ! cc @CharlyF

JulienBalestra avatar Mar 06 '18 16:03 JulienBalestra

Thanks for opening this ! It's not a regression per se as the CMs are not the same (the A6 is not meant to use the CM from the A5). I do understand the request however and will implement this.

CharlyF avatar Mar 06 '18 20:03 CharlyF

Yeah we need this fixed too :( :( This is, while not a official regression, a step backwards :(

mshutt avatar Apr 17 '18 20:04 mshutt

Thank you for letting us know @mshutt. I'm adding a card in our sprint that I will personally tackle - Thank you for your patience.

CharlyF avatar Apr 18 '18 13:04 CharlyF

Thank you! In the meanwhile, I'll see if I can give permissions to the serviceaccount in the datadog-agent namespace to manage configmaps in the default namespace without too many extra rights. It ought to be fairly straight forward.

mshutt avatar Apr 18 '18 14:04 mshutt

Hey folks, I have merged a PR to solve this: https://github.com/DataDog/datadog-agent/pull/1619.

It will be in 6.2 that we are planning on releasing in 2 weeks.

CharlyF avatar Apr 20 '18 18:04 CharlyF