dns

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DomainNameWithSubdomain

func DomainNameWithSubdomain(searchDomains []string, subdomain string) string

DomainNameWithSubdomain returns the DNS domain according subdomain. In case subdomain already exists in the domain, returns empty string, as nothing should be added. In case subdomain is empty, returns empty string, as nothing should be added. The motivation is that glibc prior to 2.26 had 6 domain / 256 bytes limit, Due to this limitation subdomain.namespace.svc.cluster.local DNS was not added by k8s to the pod /etc/resolv.conf. This function calculates the missing domain, which will be added by kubevirt. see https://github.com/kubernetes/kubernetes/issues/48019 for more details.

func GetDomainName

func GetDomainName(searchDomains []string) string

GetDomainName returns the longest search domain entry, which is the most exact equivalent to a domain

func GetLongestServiceDomainName added in v0.49.1

func GetLongestServiceDomainName(searchDomains []string) string

GetLongestServiceDomainName returns the longest service search domain entry

func GetServiceDomainList added in v0.49.1

func GetServiceDomainList(searchDomains []string) []string

GetServiceDomainList returns a list of search domains which are a service entry

func ParseNameservers

func ParseNameservers(content string) ([][]byte, error)

func ParseSearchDomains

func ParseSearchDomains(content string) ([]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL