Documentation ¶
Index ¶
- Constants
- func BuildWebhookConfig(clientConfig admissionregistrationv1.WebhookClientConfig) *admissionregistrationv1.MutatingWebhookConfiguration
- func ControllerSwitches() *extensionscmdcontroller.SwitchOptions
- func WebhookSwitchOptions() *extensionscmdwebhook.SwitchOptions
- type AddToManagerConfig
- type AddToManagerOptions
- type ExtensionOptions
- func (o *ExtensionOptions) AddFlags(fs *pflag.FlagSet)
- func (o *ExtensionOptions) Apply(config *controllerconfig.Config)
- func (o *ExtensionOptions) ApplyHealthCheckConfig(config *extensionsconfig.HealthCheckConfig)
- func (o *ExtensionOptions) Complete() error
- func (o *ExtensionOptions) Completed() *ExtensionOptions
Constants ¶
const ( // DefaultSyncPeriod is the default healthcheck-sync-period DefaultSyncPeriod = 30 * time.Second // ChartPath is the path to the chart folder ChartPath = "charts" )
Variables ¶
This section is empty.
Functions ¶
func BuildWebhookConfig ¶ added in v1.0.0
func BuildWebhookConfig(clientConfig admissionregistrationv1.WebhookClientConfig) *admissionregistrationv1.MutatingWebhookConfiguration
BuildWebhookConfig returns MutatingWebhookConfiguration for WebhookClientConfig
func ControllerSwitches ¶
func ControllerSwitches() *extensionscmdcontroller.SwitchOptions
ControllerSwitches are the cmd.SwitchOptions for the provider controllers.
func WebhookSwitchOptions ¶ added in v1.0.0
func WebhookSwitchOptions() *extensionscmdwebhook.SwitchOptions
WebhookSwitchOptions are the extensionscmdwebhook.SwitchOptions for the provider webhooks.
Types ¶
type AddToManagerConfig ¶ added in v1.0.0
type AddToManagerConfig struct { Server extensionscmdwebhook.ServerConfig Switch extensionscmdwebhook.SwitchConfig Clock clock.Clock // contains filtered or unexported fields }
AddToManagerConfig is a completed AddToManager configuration.
func (*AddToManagerConfig) AddToManager ¶ added in v1.0.0
AddToManager instantiates all webhooks of this configuration. If there are any webhooks, it creates a webhook server, registers the webhooks and adds the server to the manager. Otherwise, it is a no-op. It generates and registers the seed targeted webhooks via a MutatingWebhookConfiguration.
type AddToManagerOptions ¶ added in v1.0.0
type AddToManagerOptions struct { Server extensionscmdwebhook.ServerOptions Switch extensionscmdwebhook.SwitchOptions // contains filtered or unexported fields }
AddToManagerOptions are options to create an `AddToManager` function from ServerOptions and SwitchOptions.
func NewAddToManagerOptions ¶ added in v1.0.0
func NewAddToManagerOptions(extensionName string, serverOpts *extensionscmdwebhook.ServerOptions, switchOpts *extensionscmdwebhook.SwitchOptions) *AddToManagerOptions
NewAddToManagerOptions creates new AddToManagerOptions with the given server name, server, and switch options. It is supposed to be used for webhooks which should be automatically registered in the cluster via a MutatingWebhookConfiguration.
func (*AddToManagerOptions) AddFlags ¶ added in v1.0.0
func (c *AddToManagerOptions) AddFlags(fs *pflag.FlagSet)
AddFlags implements Option.
func (*AddToManagerOptions) Complete ¶ added in v1.0.0
func (c *AddToManagerOptions) Complete() error
Complete implements Option.
func (*AddToManagerOptions) Completed ¶ added in v1.0.0
func (c *AddToManagerOptions) Completed() *AddToManagerConfig
Completed returns the completed AddToManagerConfig. Only call this if a previous call to `Complete` succeeded.
type ExtensionOptions ¶
type ExtensionOptions struct { HealthCheckSyncPeriod time.Duration ChartPath string AdditionalAllowedCIDRs []string }
ExtensionOptions holds options related to the extension (not the extension controller)
func (*ExtensionOptions) AddFlags ¶
func (o *ExtensionOptions) AddFlags(fs *pflag.FlagSet)
AddFlags implements Flagger.AddFlags.
func (*ExtensionOptions) Apply ¶
func (o *ExtensionOptions) Apply(config *controllerconfig.Config)
Apply applies the ExtensionOptions to the passed ControllerConfig instance.
func (*ExtensionOptions) ApplyHealthCheckConfig ¶
func (o *ExtensionOptions) ApplyHealthCheckConfig(config *extensionsconfig.HealthCheckConfig)
ApplyHealthCheckConfig applies the ExtensionOptions to the passed HealthCheckConfig.
func (*ExtensionOptions) Complete ¶
func (o *ExtensionOptions) Complete() error
Complete implements Completer.Complete.
func (*ExtensionOptions) Completed ¶
func (o *ExtensionOptions) Completed() *ExtensionOptions
Completed returns ExtensionOptions.