Support CNI DNS capabilities.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
8
vendor/github.com/containerd/go-cni/namespace_opts.go
generated
vendored
8
vendor/github.com/containerd/go-cni/namespace_opts.go
generated
vendored
@@ -42,6 +42,14 @@ func WithCapabilityBandWidth(bandWidth BandWidth) NamespaceOpts {
|
||||
}
|
||||
}
|
||||
|
||||
// WithCapabilityDNS adds support for dns
|
||||
func WithCapabilityDNS(dns DNS) NamespaceOpts {
|
||||
return func(c *Namespace) error {
|
||||
c.capabilityArgs["dns"] = dns
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func WithCapability(name string, capability interface{}) NamespaceOpts {
|
||||
return func(c *Namespace) error {
|
||||
c.capabilityArgs[name] = capability
|
||||
|
||||
10
vendor/github.com/containerd/go-cni/types.go
generated
vendored
10
vendor/github.com/containerd/go-cni/types.go
generated
vendored
@@ -53,3 +53,13 @@ type BandWidth struct {
|
||||
EgressRate uint64
|
||||
EgressBurst uint64
|
||||
}
|
||||
|
||||
// DNS defines the dns config
|
||||
type DNS struct {
|
||||
// List of DNS servers of the cluster.
|
||||
Servers []string
|
||||
// List of DNS search domains of the cluster.
|
||||
Searches []string
|
||||
// List of DNS options.
|
||||
Options []string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user