config

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetConnection = func(c *Config, clusterID string) (connection.RemoteClusterClient, error) {
	return c.repConfig.GetConnection(clusterID)
}
View Source
var InClusterConfig = func() (*rest.Config, error) {
	return rest.InClusterConfig()
}
View Source
var Verify = func(config *replicationConfig, ctx context.Context) error {
	return config.Verify(ctx)
}

Functions

This section is empty.

Types

type Config

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

Config structure that combines replication configuration and current log level

func GetConfig

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

GetConfig returns new instance of replication config

func (*Config) GetClusterID added in v1.1.0

func (c *Config) GetClusterID() string

GetClusterID returns cluster ID for config instance

func (*Config) GetConnection

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

GetConnection returns cluster client for given cluster ID

func (*Config) PrintConfig

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

PrintConfig prints current config information using provided logger interface

func (*Config) UpdateConfigMap

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

UpdateConfigMap updates config instance by reading mounted config

func (*Config) UpdateConfigOnSecretEvent

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

UpdateConfigOnSecretEvent updates config instance if update to currently used secret was made

type ControllerManagerOpts

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

ControllerManagerOpts - Controller Manager configuration

func GetControllerManagerOpts

func GetControllerManagerOpts() ControllerManagerOpts

GetControllerManagerOpts initializes and returns new ControllerManagerOpts object

Jump to

Keyboard shortcuts

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