Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Conversation

@nxtcoder17
Copy link
Member

@nxtcoder17 nxtcoder17 commented Nov 11, 2024

initial reference was from k8s default pod /etc/resolv.conf, but it assumes ndots:5, which means a domain to have at least 5 dots to be qualified as a FQDN, which is kind of wrong in our use case

Resolves kloudlite/kloudlite#304

Summary by Sourcery

Bug Fixes:

  • Fix DNS query issue by changing the ndots option from 5 to 1 in the resolv.conf configuration.

- initial reference was from k8s default pod /etc/resolv.conf, but it
  assumes `ndots:5`, which means a domain to have at least 5 dots to be
  qualified as a FQDN, which is kind of wrong in our use case
@nxtcoder17 nxtcoder17 self-assigned this Nov 11, 2024
@sourcery-ai
Copy link

sourcery-ai bot commented Nov 11, 2024

Reviewer's Guide by Sourcery

This PR modifies the DNS resolution configuration in the networking operator's webhook by changing the ndots option from 5 to 1. This change affects how DNS queries are handled, making the DNS resolution more efficient by reducing unnecessary DNS searches for hostnames that don't require them.

Class diagram for DNS configuration change

classDiagram
    class Webhook {
        +string resolvConfPath
        +configureDNS()
    }

    class DNSConfiguration {
        +string searchDomains
        +int ndots
    }

    Webhook --> DNSConfiguration

    note for DNSConfiguration "ndots changed from 5 to 1"
Loading

File-Level Changes

Change Details Files
Modified DNS resolution configuration by reducing ndots value
  • Changed ndots value from 5 to 1 in resolv.conf configuration
  • Maintains existing search domain configuration for Kubernetes service discovery
operators/networking/internal/cmd/webhook/main.go

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @nxtcoder17 - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Please add documentation explaining why ndots:1 was chosen and what implications this change has for DNS resolution behavior.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@nxtcoder17 nxtcoder17 merged commit 1294fdd into release-v1.1.3 Nov 11, 2024
@nxtcoder17 nxtcoder17 deleted the hotfix/init-container-dns-issue branch November 11, 2024 07:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] DNS issues on alpine based containers

1 participant