Documentation
¶
Index ¶
- Variables
- type Config
- func (c *Config) GetClusterID() string
- func (c *Config) GetConnection(clusterID string) (connection.RemoteClusterClient, error)
- func (c *Config) PrintConfig(log logr.Logger)
- func (c *Config) UpdateConfigMap(ctx context.Context, client ctrlClient.Client, opts ControllerManagerOpts, ...) error
- func (c *Config) UpdateConfigOnSecretEvent(ctx context.Context, client ctrlClient.Client, opts ControllerManagerOpts, ...) error
- type ControllerManagerOpts
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 ¶
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
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 ¶
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
Click to show internal directories.
Click to hide internal directories.