Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Agent pods to have Affinity #319

Merged
merged 1 commit into from
Jun 22, 2021
Merged

Conversation

juliogreff
Copy link
Contributor

What does this PR do?

It is already possible to configure affinity for cluster-agent and worker deployment but not for the agent. This PR introduces that ability.

Describe your test plan

Create a DatadogAgent CR with spec.agent.affinity set to something (below is an example). Verify that the relevant pods have the same affinity rules.

podAntiAffinity:
  requiredDuringSchedulingIgnoredDuringExecution:
  - labelSelector:
      matchLabels:
        app: datadog-agent
    topologyKey: kubernetes.io/hostname

@juliogreff juliogreff added this to the v0.7 milestone Jun 8, 2021
@juliogreff juliogreff requested review from a team as code owners June 8, 2021 12:18
@codecov-commenter
Copy link

codecov-commenter commented Jun 8, 2021

Codecov Report

Merging #319 (9a9c965) into main (8072ba9) will increase coverage by 22.86%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main     #319       +/-   ##
===========================================
+ Coverage   35.55%   58.42%   +22.86%     
===========================================
  Files          62       60        -2     
  Lines       10667     6362     -4305     
===========================================
- Hits         3793     3717       -76     
+ Misses       6592     2370     -4222     
+ Partials      282      275        -7     
Flag Coverage Δ
unittests 58.42% <100.00%> (+22.86%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
api/v1alpha1/datadogagent_types.go 100.00% <ø> (ø)
controllers/datadogagent/utils.go 81.57% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8072ba9...9a9c965. Read the comment docs.

@juliogreff juliogreff merged commit 022a88e into main Jun 22, 2021
@juliogreff juliogreff deleted the juliogreff/agent-affinity branch June 22, 2021 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants