Documentation ¶
Index ¶
- Constants
- func BindGenericControllerFlags(o *GenericControllerOptions, fs ctrl.FlagSet)
- func BindGenericNamespacedControllerFlags(o *GenericNamespacedControllerOptions, fs ctrl.FlagSet)
- func BindLeaderElectionFlags(component string, o *LeaderElectionOptions, fs ctrl.FlagSet)
- func BindLoggerFlags(o *LoggerOptions, fs ctrl.FlagSet)
- func BindRestClientFlags(o *RestClientOptions, fs ctrl.FlagSet)
- func DoLeaderElection(ctx context.Context, logger *zap.Logger, component string, ...) (context.Context, error)
- func LoadRestClientConfig(userAgent string, options RestClientOptions) (*rest.Config, error)
- func Logger(level zapcore.Level, encoder func(zapcore.EncoderConfig) zapcore.Encoder) *zap.Logger
- func LoggerFromOptions(o LoggerOptions) *zap.Logger
- type GenericControllerOptions
- type GenericNamespacedControllerOptions
- type LeaderElectionOptions
- type LoggerOptions
- type RestClientOptions
Constants ¶
View Source
const ( DefaultAPIQPS = 5 APIQPSBurstFactor = 1.5 )
View Source
const ( DefaultResyncPeriod = 20 * time.Minute DefaultWorkers = 2 )
Variables ¶
This section is empty.
Functions ¶
func BindGenericControllerFlags ¶
func BindGenericControllerFlags(o *GenericControllerOptions, fs ctrl.FlagSet)
func BindGenericNamespacedControllerFlags ¶
func BindGenericNamespacedControllerFlags(o *GenericNamespacedControllerOptions, fs ctrl.FlagSet)
func BindLeaderElectionFlags ¶
func BindLeaderElectionFlags(component string, o *LeaderElectionOptions, fs ctrl.FlagSet)
func BindLoggerFlags ¶
func BindLoggerFlags(o *LoggerOptions, fs ctrl.FlagSet)
func BindRestClientFlags ¶
func BindRestClientFlags(o *RestClientOptions, fs ctrl.FlagSet)
func DoLeaderElection ¶
func DoLeaderElection(ctx context.Context, logger *zap.Logger, component string, config LeaderElectionOptions, configMapsGetter core_v1client.ConfigMapsGetter, recorder record.EventRecorder) (context.Context, error)
DoLeaderElection starts leader election and blocks until it acquires the lease. Returned context is cancelled once the lease is lost or ctx signals done.
func LoadRestClientConfig ¶
func LoadRestClientConfig(userAgent string, options RestClientOptions) (*rest.Config, error)
func LoggerFromOptions ¶
func LoggerFromOptions(o LoggerOptions) *zap.Logger
Types ¶
type GenericControllerOptions ¶
func (*GenericControllerOptions) DefaultAndValidate ¶
func (o *GenericControllerOptions) DefaultAndValidate() []error
type GenericNamespacedControllerOptions ¶
type GenericNamespacedControllerOptions struct { GenericControllerOptions Namespace string }
type LeaderElectionOptions ¶
type LeaderElectionOptions struct { LeaderElect bool LeaseDuration time.Duration RenewDeadline time.Duration RetryPeriod time.Duration ConfigMapNamespace string ConfigMapName string }
See k8s.io/apiserver/pkg/apis/config/types.go LeaderElectionConfiguration for leader election configuration description.
type LoggerOptions ¶
type RestClientOptions ¶
type RestClientOptions struct { APIQPS float64 ClientConfigFileFrom string ClientConfigFileName string ClientContext string }
func (*RestClientOptions) DefaultAndValidate ¶
func (o *RestClientOptions) DefaultAndValidate() []error
Click to show internal directories.
Click to hide internal directories.