examples/

directory
v0.0.0-...-0c53b8b Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: Apache-2.0

README

Examples

  • examples/kubernetes - is a copy of CoreDNS's built-in kubernetes plugin (circa 1.7.0), refactored to use the k8s_api plugin. It registers 4 informers: "service", "endpoints", "namespace", and "pod" (if pods verified is declared).

  • examples/podnames - enable Pod lookup by podname/namespace. e.g. mypod.mynamespace.pod.cluster.local. It uses the "pod" informer created by the examples/kubernetes plugin above. e.g.

    plugin.cfg:

    ...
    podnames:github.com/chrisohaver/k8s_api/examples/podnames
    kubernetes:github.com/chrisohaver/k8s_api/examples/kubernetes
    k8s_api:github.com/chrisohaver/k8s_api/k8s_api
    ...
    

    Corefile:

    .:53 {
      podnames pod.cluster.local in-addr.arpa ip6.arpa {
        ttl 5
      }
    
      kubernetes cluster.local in-addr.arpa ip6.arpa {
        pods verified
      }
    
      k8s_api
    }
    
    

Directories

Path Synopsis
Package kubernetes provides the kubernetes backend.
Package kubernetes provides the kubernetes backend.
object
Package object holds functions that convert the objects from the k8s API in to a more memory efficient structures.
Package object holds functions that convert the objects from the k8s API in to a more memory efficient structures.

Jump to

Keyboard shortcuts

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