Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerCommandConfig ¶
type ControllerCommandConfig struct {
// contains filtered or unexported fields
}
ControllerCommandConfig holds values required to construct a command to run.
func NewControllerCommandConfig ¶
func NewControllerCommandConfig(componentName string, version version.Info, startFunc StartFunc) *ControllerCommandConfig
NewControllerConfig returns a new ControllerCommandConfig which can be used to wire up all the boiler plate of a controller TODO add more methods around wiring health checks and the like
func (*ControllerCommandConfig) NewCommand ¶
func (c *ControllerCommandConfig) NewCommand() *cobra.Command
func (*ControllerCommandConfig) StartController ¶
func (c *ControllerCommandConfig) StartController(ctx context.Context) error
StartController runs the controller. This is the recommend entrypoint when you don't need to customize the builder.
func (*ControllerCommandConfig) WithHealthChecks ¶
func (c *ControllerCommandConfig) WithHealthChecks(healthChecks ...healthz.HealthChecker) *ControllerCommandConfig
type ControllerFlags ¶
type ControllerFlags struct { // KubeConfigFile points to a kubeconfig file if you don't want to use the in cluster config KubeConfigFile string // EnableLeaderElection enables the leader election for the controller EnableLeaderElection bool // ComponentNamespace is the namespace to run component ComponentNamespace string }
ControllerFlags provides the "normal" controller flags
func NewControllerFlags ¶
func NewControllerFlags() *ControllerFlags
NewControllerFlags returns flags with default values set
func (*ControllerFlags) AddFlags ¶
func (f *ControllerFlags) AddFlags(cmd *cobra.Command)
AddFlags register and binds the default flags
Click to show internal directories.
Click to hide internal directories.