controller

package
v0.0.0-...-c0075e5 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2018 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MacroController

type MacroController struct {
	// ConfigMap is the name of the config map in which to derive configuration of the controller from
	ConfigMap string
	// namespace for config map
	ConfigMapNS string
	// Config is the macro controller's configuration
	Config MacroControllerConfig
	// contains filtered or unexported fields
}

MacroController is the controller for microservice resources

func NewMacroController

func NewMacroController(restConfig *rest.Config, kubeclientset kubernetes.Interface, clientset microclientset.Interface, configMap string) *MacroController

NewMacroController instantiates a new MacroController

func (*MacroController) ResyncConfig

func (mc *MacroController) ResyncConfig() error

ResyncConfig reloads the controller config from the configmap

func (*MacroController) Run

func (mc *MacroController) Run(ctx context.Context, microWorkers, podWorkers int)

Run starts a microservice resource controller

type MacroControllerConfig

type MacroControllerConfig struct {
	// Namespace is a label selector filter to limit the controller's watch to a specific namespace
	Namespace string `json:"namespace,omitempty"`

	// InstanceID is a label selector to limit the controller's watch to a specific instance. It
	// contains an arbitrary value that is carried forward into its pod labels, under the key
	// microservices.micro.mu/controller-instanceid, for the purposes of microservice segregation. This
	// enables a controller to only receive microservices and pod events that it is interested about,
	// in order to support multiple controllers in a single cluster, and ultimately allows the
	// controller itself to be bundled as part of a higher level application. If omitted, the
	// controller watches microservices and pods that *are not* labeled with an instance id.
	InstanceID string `json:"instanceID,omitempty"`

	MatchLabels map[string]string `json:"matchLabels,omitempty"`
}

MacroControllerConfig contain the configuration settings for the macro controller

Jump to

Keyboard shortcuts

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