bootstrap

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(ctx context.Context, rootLogger string, start StartReconciler, opts Options) error

the mesh-discovery controller is the Kubernetes Controller/Operator which processes k8s storage events to produce discovered resources.

Types

type Options

type Options struct {
	// MetricsBindPort is the TCP port that the controller should bind to
	// for serving prometheus metrics.
	// It can be set to 0 to disable the metrics serving.
	MetricsBindPort uint32

	// MasterNamespace if specified restricts the Master manager's cache to watch objects in the desired namespace.
	// Defaults to all namespaces.
	//
	// Note: If a namespace is specified, controllers can still Watch for a cluster-scoped resource (e.g Node).  For namespaced resources the cache will only hold objects from the desired namespace.
	MasterNamespace string

	// enables verbose mode
	VerboseMode bool

	// ManagementContext if specified read the KubeConfig for the management cluster from this context. Only applies when running out of cluster.
	ManagementContext string

	// Reference to the Settings object that the controller should use.
	SettingsRef v1.ObjectRef
}

bootstrap options for starting discovery

func (*Options) AddToFlags

func (opts *Options) AddToFlags(flags *pflag.FlagSet)

convenience function for setting these options via spf13 flags

type StartParameters

type StartParameters struct {
	Ctx             context.Context
	MasterManager   manager.Manager
	McClient        multicluster.Client
	Clusters        multicluster.Interface
	SnapshotHistory *stats.SnapshotHistory
	// Reference to Settings object this controller uses.
	SettingsRef v1.ObjectRef
	// enable additional logging
	VerboseMode bool
}

type StartReconciler

type StartReconciler func(
	parameters StartParameters,
) error

Jump to

Keyboard shortcuts

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