ksr

package
v0.0.0-...-792cabc Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package ksr defines flavor used for the contiv-ksr agent.

Index

Constants

View Source
const (
	// MicroserviceLabel is the microservice label used by contiv-ksr.
	MicroserviceLabel = "contiv-ksr"

	// 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

This section is empty.

Functions

func NewAgent

func NewAgent(opts ...core.Option) *core.Agent

NewAgent returns a new instance of the Agent with plugins. It is an alias for core.NewAgent() to implicit use of the FlavorKsr

func WithPlugins

func WithPlugins(listPlugins func(local *FlavorKsr) []*core.NamedPlugin) core.WithPluginsOpt

WithPlugins for adding custom plugins to SFC Controller <listPlugins> is a callback that uses flavor input to inject dependencies for custom plugins that are in output

Types

type FlavorKsr

type FlavorKsr struct {
	// Local flavor is used to access the Infra (logger, service label, status check)
	*local.FlavorLocal
	// RPC flavor for REST-based management.
	*rpc.FlavorRPC
	// Plugins for access to ETCD data store.
	ETCD         etcdv3.Plugin
	ETCDDataSync kvdbsync.Plugin
	// Kubernetes State Reflector plugin works as a reflector for policies, pods
	// and namespaces.
	Ksr ksr.Plugin
	// contains filtered or unexported fields
}

FlavorKsr glues together multiple plugins to watch selected k8s resources and causes all changes to be reflected in a given store.

func (*FlavorKsr) Inject

func (f *FlavorKsr) Inject() (allReadyInjected bool)

Inject sets inter-plugin references.

func (*FlavorKsr) Plugins

func (f *FlavorKsr) Plugins() []*core.NamedPlugin

Plugins combines all plugins in the flavor into a slice.

Jump to

Keyboard shortcuts

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