README
¶
行为约定
A
names=''
names="$names titan" #ok, guest PlainName
names="$names titan.hq.cloud.yunionyun.com" #ok, guest CloudZoneFQDN
names="$names kubenode" #ok, host PlainName
names="$names kubenode.hq.cloud.yunionyun.com" #ok, host CloudZoneFQDN
names="$names whoever-the-ether" #NXDOMAIN, nonexistent PlainName
names="$names whoever-the-ether.titan.hq.cloud.yunionyun.com" #NXDOMAIN, nonexistent CloudZoneFQDN
names="$names mail.google.com" #ok, dnsrecords
names="$names www.douban.com" #ok, pub
names="$names app" #ok, k8s svc PlainName in "default" ns
names="$names app.default" #NXDOMAIN, k8s svc name.namespace
names="$names app.default.hq.cloud.yunionyun.com" #ok, k8s name.ns CloudZoneFQDN
names="$names mon-kafka.system" #NXDOMAIN, k8s svc name.namespace
names="$names mon-kafka.system.hq.cloud.yunionyun.com" #ok, k8s name.ns CloudZoneFQDN
# TODO source IP
# TODO other TYPEs
for name in $names; do
echo "############### $name"
#dig @192.168.222.171 $name
#dig -p 54 @10.168.222.136 $name
dig -p 54 @192.168.222.171 $name
done
PTR
names=''
names="$names " #ok, guest ip
names="$names " #ok, host ip
names="$names " #ok, ptr records in db
names="$names " #NXDOMAIN, others
for name in $names; do
echo "############### $name"
dig -p 54 @192.168.222.171 -x $name
done
配置
log {
# note that apart from rcode like NXDOMAIN, SERVFAIL, coredns will also
# log NOERROR response when it's NoData as defined by coredns itself
#
# > NoData indicates name found, but not the type: NOERROR in header, SOA in auth.
#
class denial
class error
}
Documentation
¶
Index ¶
- Constants
- Variables
- type K8sQueryInfo
- type SRegionDNS
- func (r *SRegionDNS) IsNameError(err error) bool
- func (r *SRegionDNS) Lookup(state request.Request, name string, typ uint16) (*dns.Msg, error)
- func (r *SRegionDNS) MinTTL(state request.Request) uint32
- func (r *SRegionDNS) Name() string
- func (r *SRegionDNS) Records(state request.Request, exact bool) ([]msg.Service, error)
- func (r *SRegionDNS) Reverse(state request.Request, exact bool, opt plugin.Options) (services []msg.Service, err error)
- func (r *SRegionDNS) Serial(state request.Request) uint32
- func (r *SRegionDNS) ServeDNS(ctx context.Context, w dns.ResponseWriter, rmsg *dns.Msg) (int, error)
- func (r *SRegionDNS) Services(state request.Request, exact bool, opt plugin.Options) (services []msg.Service, err error)
- func (r *SRegionDNS) Transfer(ctx context.Context, state request.Request) (int, error)
Constants ¶
View Source
const (
PluginName string = "yunion"
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type K8sQueryInfo ¶
type SRegionDNS ¶
type SRegionDNS struct { Next plugin.Handler Fall fall.F Zones []string PrimaryZone string Upstream upstream.Upstream SqlConnection string K8sConfigFile string K8sClient *kubernetes.Clientset }
func New ¶
func New() *SRegionDNS
func (*SRegionDNS) IsNameError ¶
func (r *SRegionDNS) IsNameError(err error) bool
IsNameError implements the ServiceBackend interface
func (*SRegionDNS) MinTTL ¶
func (r *SRegionDNS) MinTTL(state request.Request) uint32
MinTTL implements the Transferer interface
func (*SRegionDNS) Name ¶
func (r *SRegionDNS) Name() string
func (*SRegionDNS) Reverse ¶
func (r *SRegionDNS) Reverse(state request.Request, exact bool, opt plugin.Options) (services []msg.Service, err error)
Reverse implements the ServiceBackend interface
func (*SRegionDNS) Serial ¶
func (r *SRegionDNS) Serial(state request.Request) uint32
Serial implements the Transferer interface
func (*SRegionDNS) ServeDNS ¶
func (r *SRegionDNS) ServeDNS(ctx context.Context, w dns.ResponseWriter, rmsg *dns.Msg) (int, error)
Click to show internal directories.
Click to hide internal directories.