controller

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeManager

func InitializeManager(config *Config) (ctrl.Manager, error)

InitializeManager creates a controller manager and adds all the controllers and webhooks to the controller-manager using the passed in Config.

Types

type Config

type Config struct {
	// MetricsAddr is the address the metric endpoint binds to.
	// Deprecated: This field will be eventually removed. Please use Server.Metrics.BindAddress instead.
	MetricsAddr string
	// Server is the configuration for the HTTP server.
	Server         *ServerConfig
	LeaderElection LeaderElectionConfig
	// DisableLeaseCache specifies whether to disable cache for lease.coordination.k8s.io resources.
	DisableLeaseCache bool
	// FeatureGates contains the feature gates to be used by etcd-druid.
	FeatureGates featuregate.MutableFeatureGate
	// Controllers defines the configuration for etcd-druid controllers.
	Controllers *controller.Config
	// Webhooks defines the configuration for etcd-druid webhooks.
	Webhooks *webhook.Config
}

Config defines the configuration for the controller manager.

func (*Config) InitFromFlags

func (cfg *Config) InitFromFlags(fs *flag.FlagSet) error

InitFromFlags initializes the controller manager config from the provided CLI flag set.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate validates the controller manager config.

type HTTPSServer

type HTTPSServer struct {
	// Server is the configuration for the bind address and the port.
	Server
	// TLSConfig contains information about the TLS configuration for an HTTPS server.
	TLSConfig TLSServerConfig
}

HTTPSServer is the configuration for the HTTPSServer server.

type LeaderElectionConfig

type LeaderElectionConfig struct {
	// Enabled specifies whether to enable leader election for controller manager.
	Enabled bool
	// ID is the name of the resource that leader election will use for holding the leader lock.
	ID string
	// ResourceLock specifies which resource type to use for leader election.
	// Deprecated: K8S Leases will be used for leader election. No other resource type would be permitted.
	// This configuration option will be removed eventually. It is advisable to not use this option any longer.
	ResourceLock string
}

LeaderElectionConfig defines the configuration for the leader election for the controller manager.

type Server

type Server struct {
	// BindAddress is the IP address on which to listen for the specified port.
	BindAddress string
	// Port is the port on which to serve unsecured, unauthenticated access.
	Port int
}

Server contains information for HTTP(S) server configuration.

type ServerConfig

type ServerConfig struct {
	// Webhook is the configuration for the HTTPS webhook server.
	Webhook HTTPSServer
	// Metrics is the configuration for serving the metrics endpoint.
	Metrics *Server
}

ServerConfig contains details for the HTTP(S) servers.

type TLSServerConfig

type TLSServerConfig struct {
	// ServerCertDir is the path to a directory containing the server's TLS certificate and key (the files must be
	// named tls.crt and tls.key respectively).
	ServerCertDir string
}

TLSServerConfig contains information about the TLS configuration for an HTTPS server.

Jump to

Keyboard shortcuts

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