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

Added DNSpolicy and DNSConfig overrides #1233

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Added DNSpolicy and DNSConfig overrides #1233

wants to merge 3 commits into from

Conversation

Eokye
Copy link
Collaborator

@Eokye Eokye commented Jun 12, 2024

What does this PR do?

CECO-1252(https://datadoghq.atlassian.net/browse/CECO-1252
DNS config and DNS policy overrides were migrated to v2 from v1. This change fixes that.

A brief description of the change being made with this pull request.
DNS config + policy added to overrides and unit tested.

Motivation

What inspired you to submit this pull request?
#1144
https://datadoghq.atlassian.net/browse/CONS-6318

Additional Notes

Anything else we should know when reviewing?

Minimum Agent Versions

Are there minimum versions of the Datadog Agent and/or Cluster Agent required?

  • Agent: vX.Y.Z
  • Cluster Agent: vX.Y.Z

Describe your test plan

Used this manifest for the datadog-agent on a kind local cluster:

apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
  override:
    nodeAgent:
      image:
        name: gcr.io/datadoghq/agent:7.55.0-rc.3
      dnsPolicy: ClusterFirstWithHostNet
      dnsConfig: 
        nameservers:
        - 10.9.8.7
        - 10.9.7.4
    clusterAgent:
      image:
        name: gcr.io/datadoghq/cluster-agent:7.55.0-rc.3
    clusterChecksRunner:
      image:
        name: gcr.io/datadoghq/agent:7.55.0-rc.3
  global:
    clusterName: kind-control
    kubelet:
      tlsVerify: false
    site: datadoghq.com
    credentials:
      apiSecret:
        secretName: datadog-secret
        keyName: api-key

The resulting change in the agent pod CRD:

  dnsConfig:
    nameservers:
    - 10.9.8.7
    - 10.9.7.4
  dnsPolicy: ClusterFirstWithHostNet

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label

@Eokye Eokye requested review from a team as code owners June 12, 2024 22:02
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request does not contain a valid label. Please add one of the following labels: bug, enhancement, refactoring, documentation, tooling, dependencies

@levan-m levan-m added this to the v1.8.0 milestone Jun 13, 2024
@levan-m levan-m added enhancement New feature or request and removed feature request labels Jun 13, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.34%. Comparing base (c46b61d) to head (b74a4fb).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1233      +/-   ##
==========================================
+ Coverage   59.33%   59.34%   +0.01%     
==========================================
  Files         177      177              
  Lines       22371    22377       +6     
==========================================
+ Hits        13273    13279       +6     
  Misses       8286     8286              
  Partials      812      812              
Flag Coverage Δ
unittests 59.34% <100.00%> (+0.01%) ⬆️

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

Files Coverage Δ
apis/datadoghq/v2alpha1/datadogagent_types.go 100.00% <ø> (ø)
...ntrollers/datadogagent/override/podtemplatespec.go 72.72% <100.00%> (+0.56%) ⬆️

Continue to review full report in Codecov by Sentry.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants