nsip

package module
v0.0.0-...-b262ef6 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

coredns-nsip

Corefile

foo.bar:1053 {
    loop
    log
    nsip {
        ns1 192.168.1.100
        ns2 192.168.2.101
    }
    forward . /etc/resolv.conf
}
foo.baz:1053 {
    log
    nsip {
        ns1 192.168.2.102
    }
    errors
}

kubernetes

$ kubectl -n ns1 exec -it nginx -- bash
root@nginx:/# curl -v a.foo.bar
*   Trying 192.168.1.100:80...

$ kubectl -n ns2 exec -it nginx -- bash
root@nginx:/# curl -v a.foo.bar
*   Trying 192.168.1.101:80...

Coredns rebuild

$ git clone https://github.com/coredns/coredns.git
$ cd coredns
# configure Corefile
$ vim Corefile

(!) IT IS IMPORTANT TO NOTE THE ORDER OF PLUGINS
$ cat plugin.cfg
nsip:github.com/mirisu2/coredns-nsip
forward:forward

$ GOPROXY=direct go get github.com/mirisu2/coredns-nsip
$ make
$ docker build --network host -t dockeruser/coredns:nsip .
$ docker push dockeruser/coredns:nsip

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Record

type Record struct {
	Next  plugin.Handler
	Rules []rule
}

func (Record) Name

func (a Record) Name() string

func (Record) ServeDNS

func (a Record) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)

Jump to

Keyboard shortcuts

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