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

feat: add support for custom search domains #9844

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

DmitriyMV
Copy link
Member

@DmitriyMV DmitriyMV commented Nov 29, 2024

New config field machine.network.searchDomains supports specifying custom search domains.

For the node it will look something like this:

nameserver 127.0.0.53

search my-custom-search-name.com my-custom-search-name2.com

For the pods it will look something like this:

search default.svc.cluster.local svc.cluster.local cluster.local my-custom-search-name.com my-custom-search-name2.com
nameserver 10.96.0.10
options ndots:5

Fixes #9342

@DmitriyMV DmitriyMV force-pushed the support-search-domains branch from 2e68dab to 1af1f81 Compare November 29, 2024 15:53
@DmitriyMV DmitriyMV changed the title chore: add support for custom search domains feat: add support for custom search domains Nov 29, 2024
@DmitriyMV DmitriyMV force-pushed the support-search-domains branch from 1af1f81 to c09ef85 Compare November 29, 2024 15:57
hack/release.toml Outdated Show resolved Hide resolved
New config field `machine.network.searchDomains` supports specifying custom search domains.

For the node it will look something like this:
```
nameserver 127.0.0.53

search my-custom-search-name.com my-custom-search-name2.com
```

For the pods it will look something like this:

```
search default.svc.cluster.local svc.cluster.local cluster.local my-custom-search-name.com my-custom-search-name2.com
nameserver 10.96.0.10
options ndots:5
```

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
@DmitriyMV DmitriyMV force-pushed the support-search-domains branch from c09ef85 to 60e4561 Compare November 29, 2024 16:18
@DmitriyMV
Copy link
Member Author

/m

@talos-bot talos-bot merged commit 60e4561 into siderolabs:main Nov 29, 2024
50 checks passed
@DmitriyMV DmitriyMV deleted the support-search-domains branch November 29, 2024 17:07
@flpajany
Copy link

flpajany commented Dec 2, 2024

Hi @DmitriyMV,

We have the same problem with our talos clusters where we have several DNS domains.

Currently we are running our clusters in talos 1.7 and we do not plan to upgrade to 1.8 or 1.9 in the near futur.

So please, is it possible to backport this feature in talos 1.7 ?

Thank you so much.
Regards,

@DmitriyMV
Copy link
Member Author

DmitriyMV commented Dec 2, 2024

@flpajany greetings! Thanks for the request. Unfortunately we do not backport changes that modify machine config or proto resources. Those backports leaves a big chance of accidentally breaking things.

@flpajany
Copy link

flpajany commented Dec 2, 2024

I understand. Is there a way to change the seach path for DNS resolution manually ?

@smira
Copy link
Member

smira commented Dec 2, 2024

I understand. Is there a way to change the seach path for DNS resolution manually ?

This PR is mostly about host search path in the /etc/resolv.conf.

See #9342 for discussion for K8s pods and others.

@flpajany
Copy link

flpajany commented Dec 2, 2024

It is exactly what I am talking about : a way to change /etc/resolv.conf and add other domains to the search path to the host.

I was thinking about changing machineconfig to add something like this :

machine:
    files:
        - path: /etc/resolv.conf
          op: append
          content: 'search mydomain.com'
          permissions: 0o644

Edit : tested and not working :-(

@smira
Copy link
Member

smira commented Dec 2, 2024

this won't work most probably.

you can achieve the same by setting the hostname to the fqdn as well.

@flpajany
Copy link

flpajany commented Dec 2, 2024

this won't work most probably.

you can achieve the same by setting the hostname to the fqdn as well.

I understand but unfortunatly it is complicated to do that for some applications. We'll try nonetheless to change it that way and I'll be back here to tell you the result.

@smira
Copy link
Member

smira commented Dec 2, 2024

Also keep in mind that k8s pod search path is totally independent of this change.

@flpajany
Copy link

flpajany commented Dec 2, 2024

That would mean to rebuild container images, thing we are not able to do :-(

@smira
Copy link
Member

smira commented Dec 2, 2024

Please read #9342 carefully. If you have any specific question - create a GitHub discussion with all relevant information.

@flpajany
Copy link

flpajany commented Dec 2, 2024

OK we'll try this too. Thx

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

Successfully merging this pull request may close these issues.

Specify additional DNS search domains
4 participants