crd

package
v3.3.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: Apache-2.0 Imports: 40 Imported by: 3

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
	ServiceLabel servicelabel.ReaderAPI

	// Kubeconfig with k8s cluster address and access credentials to use.
	KubeConfig config.PluginConfig

	Resync resync.Subscriber

	HTTP rest.HTTPHandlers

	/* both Publish and Watcher are prefixed for KSR-published K8s state data */
	Watcher datasync.KeyValProtoWatcher
	Etcd    *etcd.Plugin // etcd plugin is specifically required for election and raw-data support
}

Deps defines dependencies of CRD 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 implements NodeConfig and TelemetryReport CRDs.

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.

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
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/contivppio/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/contivppio/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
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