crd

package
v2.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2018 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfigFlagName is name of the flag that defines kubeconfig location
	ConfigFlagName = "kube-config"

	// KubeConfigAdmin is the default location of kubeconfig with admin credentials.
	KubeConfigAdmin = "/etc/kubernetes/admin.conf"

	// KubeConfigUsage explains the purpose of 'kube-config' flag.
	KubeConfigUsage = "Path to the kubeconfig file to use for the client connection to K8s cluster"
)

Variables

View Source
var DefaultPlugin = *NewPlugin()

DefaultPlugin is default instance of Plugin.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	infra.PluginDeps
	// Kubeconfig with k8s cluster address and access credentials to use.
	KubeConfig config.PluginConfig

	Resync resync.Subscriber

	/* both Publish and Watcher are prefixed for KSR-published K8s state data */
	Watcher datasync.KeyValProtoWatcher
	Publish *kvdbsync.Plugin // KeyProtoValWriter does not define Delete
}

Deps defines dependencies of policy plugin.

type Option

type Option func(*Plugin)

Option is a function that acts on a Plugin to inject Dependencies or configuration

func UseDeps

func UseDeps(cb func(*Deps)) Option

UseDeps returns Option that can inject custom dependencies.

type Plugin

type Plugin struct {
	Deps
	// contains filtered or unexported fields
}

Plugin watches configuration of K8s resources (as reflected by KSR into ETCD) for changes in policies, pods and namespaces and applies rules into extendable set of network stacks.

func NewPlugin

func NewPlugin(opts ...Option) *Plugin

NewPlugin creates a new Plugin with the provides Options

func (*Plugin) AfterInit

func (p *Plugin) AfterInit() error

AfterInit registers to the ResyncOrchestrator. The registration is done in this phase in order to ensure that the resync for this plugin is triggered only after resync of the Contiv plugin has finished.

func (*Plugin) Close

func (p *Plugin) Close() error

Close stops the processor and watching.

func (*Plugin) Init

func (p *Plugin) Init() error

Init initializes policy layers and caches and starts watching contiv-etcd for K8s configuration.

Directories

Path Synopsis
controller
nodeconfig/model
Package model is a generated protocol buffer package.
Package model is a generated protocol buffer package.
pkg
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/nodeconfig/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/nodeconfig/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
client/clientset/versioned/typed/telemetry/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/telemetry/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
l2
l3

Jump to

Keyboard shortcuts

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