package dns

import "k8s.io/kubernetes/pkg/kubelet/network/dns"

Index

Types

type Configurer

type Configurer struct {

	// If non-empty, use this for container DNS search.
	ClusterDomain string
	// The path to the DNS resolver configuration file used as the base to generate
	// the container's DNS resolver configuration file. This can be used in
	// conjunction with clusterDomain and clusterDNS.
	ResolverConfig string
	// contains filtered or unexported fields
}

Configurer is used for setting up DNS resolver configuration when launching pods.

func NewConfigurer

func NewConfigurer(recorder record.EventRecorder, nodeRef *v1.ObjectReference, nodeIPs []net.IP, clusterDNS []net.IP, clusterDomain, resolverConfig string) *Configurer

NewConfigurer returns a DNS configurer for launching pods.

func (*Configurer) CheckLimitsForResolvConf

func (c *Configurer) CheckLimitsForResolvConf()

CheckLimitsForResolvConf checks limits in resolv.conf.

func (*Configurer) GetPodDNS

func (c *Configurer) GetPodDNS(pod *v1.Pod) (*runtimeapi.DNSConfig, error)

GetPodDNS returns DNS settings for the pod.

func (*Configurer) SetupDNSinContainerizedMounter

func (c *Configurer) SetupDNSinContainerizedMounter(mounterPath string)

SetupDNSinContainerizedMounter replaces the nameserver in containerized-mounter's rootfs/etc/resolv.conf with kubelet.ClusterDNS

type FixedInfo

type FixedInfo struct {
	HostName         [maxHostnameLen + 4]byte
	DomainName       [maxDomainNameLen + 4]byte
	CurrentDNSServer *syscall.IpAddrString
	DNSServerList    syscall.IpAddrString
	NodeType         uint32
	ScopeID          [maxScopeIDLen + 4]byte
	EnableRouting    uint32
	EnableProxy      uint32
	EnableDNS        uint32
}

FixedInfo information: https://docs.microsoft.com/en-us/windows/win32/api/iptypes/ns-iptypes-fixed_info_w2ksp1

Source Files

dns.go dns_windows.go

Version
v1.29.7
Published
Jul 16, 2024
Platform
windows/amd64
Imports
21 packages
Last checked
15 minutes ago

Tools for package owners.