config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(source string, targets ...string) connection.MultiClusterClient

func NewFakeConfig

func NewFakeConfig(source string, targets ...string) connection.MultiClusterClient

func NewFakeConfigForSingleCluster

func NewFakeConfigForSingleCluster(selfClient client.Client, source string, targets ...string) connection.MultiClusterClient

Types

type Config

type Config struct {
	LogLevel string
	Lock     sync.Mutex
	// contains filtered or unexported fields
}

Config

func GetConfig

func GetConfig(ctx context.Context, client ctrlClient.Client, opts ControllerManagerOpts, recorder record.EventRecorder, log logr.Logger) (*Config, error)

func (*Config) GetClusterId

func (c *Config) GetClusterId() string

func (*Config) GetConnection

func (c *Config) GetConnection(clusterId string) (connection.RemoteClusterClient, error)

func (*Config) PrintConfig

func (c *Config) PrintConfig(log logr.Logger)

func (*Config) UpdateConfigMap

func (c *Config) UpdateConfigMap(ctx context.Context, client ctrlClient.Client, opts ControllerManagerOpts, recorder record.EventRecorder, log logr.Logger) error

func (*Config) UpdateConfigOnSecretEvent

func (c *Config) UpdateConfigOnSecretEvent(ctx context.Context, client ctrlClient.Client, opts ControllerManagerOpts, secretName string, recorder record.EventRecorder, log logr.Logger) error

type ControllerManagerOpts

type ControllerManagerOpts struct {
	UseConfFileFormat bool
	WatchNamespace    string
	ConfigDir         string
	ConfigFileName    string
	InCluster         bool
}

ControllerManagerOpts - Controller Manager configuration

func GetControllerManagerOpts

func GetControllerManagerOpts() ControllerManagerOpts

GetControllerManagerOpts

type FakeConfig

type FakeConfig struct {
	// contains filtered or unexported fields
}

func (*FakeConfig) GetClusterId

func (c *FakeConfig) GetClusterId() string

func (*FakeConfig) GetConnection

func (c *FakeConfig) GetConnection(clusterId string) (connection.RemoteClusterClient, error)

Jump to

Keyboard shortcuts

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