Documentation
¶
Index ¶
- Variables
- func BoolPtr(i bool) *bool
- func BuildHandlerChain(apiHandler http.Handler, authorizationInfo *apiserver.AuthorizationInfo, ...) http.Handler
- func CatchPanic(funcName string, addon string)
- func DeleteReplicaSetApp(ctx context.Context, kubeClient *kubernetes.Clientset, ...) error
- func GetAvailableResources(clientBuilder ClientBuilder) (map[schema.GroupVersionResource]bool, error)
- func Int32Ptr(i int32) *int32
- func Int64Ptr(i int64) *int64
- func NewBaseHandler(c *componentconfig.DebuggingConfiguration, checks ...healthz.HealthChecker) *mux.PathRecorderMux
- func ResyncPeriod(cfg *options.ComponentConfiguration) func() time.Duration
- func WaitForAPIServer(client versionedclientset.Interface, timeout time.Duration) error
- func WaitForCacheSync(controllerName string, stopCh <-chan struct{}, ...) bool
- type ClientBuilder
- type SimpleControllerClientBuilder
- func (b SimpleControllerClientBuilder) Client(name string) (versionedclientset.Interface, error)
- func (b SimpleControllerClientBuilder) ClientGoClient(name string) (versionedclientset.Interface, error)
- func (b SimpleControllerClientBuilder) ClientGoClientOrDie(name string) versionedclientset.Interface
- func (b SimpleControllerClientBuilder) ClientOrDie(name string) versionedclientset.Interface
- func (b SimpleControllerClientBuilder) Config(name string) (*rest.Config, error)
- func (b SimpleControllerClientBuilder) ConfigOrDie(name string) *rest.Config
Constants ¶
This section is empty.
Variables ¶
var ( // KeyFunc checks for DeletedFinalStateUnknown objects before calling MetaNamespaceKeyFunc. KeyFunc = cache.DeletionHandlingMetaNamespaceKeyFunc )
Functions ¶
func BuildHandlerChain ¶
func BuildHandlerChain(apiHandler http.Handler, authorizationInfo *apiserver.AuthorizationInfo, authenticationInfo *apiserver.AuthenticationInfo, codec runtime.NegotiatedSerializer) http.Handler
BuildHandlerChain builds a handler chain with a base handler and CompletedConfig.
func CatchPanic ¶
CatchPanic handles any panics that might occur during the handlePhase
func DeleteReplicaSetApp ¶
func DeleteReplicaSetApp(ctx context.Context, kubeClient *kubernetes.Clientset, options metav1.ListOptions) error
DeleteReplicaSetApp delete the replicaset and pod additionally for deployment app with extension group
func GetAvailableResources ¶
func GetAvailableResources(clientBuilder ClientBuilder) (map[schema.GroupVersionResource]bool, error)
GetAvailableResources needs to be exposed for the construction of a proper ControllerContext.
func NewBaseHandler ¶
func NewBaseHandler(c *componentconfig.DebuggingConfiguration, checks ...healthz.HealthChecker) *mux.PathRecorderMux
NewBaseHandler takes in CompletedConfig and returns a handler.
func ResyncPeriod ¶
func ResyncPeriod(cfg *options.ComponentConfiguration) func() time.Duration
ResyncPeriod returns a function which generates a duration each time it is invoked; this is so that multiple controllers don't get into lock-step and all hammer the apiserver with list requests simultaneously.
func WaitForAPIServer ¶
func WaitForAPIServer(client versionedclientset.Interface, timeout time.Duration) error
WaitForAPIServer waits for the API Server's /healthz endpoint to report "ok" with timeout.
func WaitForCacheSync ¶
func WaitForCacheSync(controllerName string, stopCh <-chan struct{}, cacheSyncs ...cache.InformerSynced) bool
WaitForCacheSync is a wrapper around cache.WaitForCacheSync that generates log messages indicating that the controller identified by controllerName is waiting for syncs, followed by either a successful or failed sync.
Types ¶
type ClientBuilder ¶
type ClientBuilder interface { Config(name string) (*rest.Config, error) ConfigOrDie(name string) *rest.Config Client(name string) (versionedclientset.Interface, error) ClientOrDie(name string) versionedclientset.Interface ClientGoClient(name string) (versionedclientset.Interface, error) ClientGoClientOrDie(name string) versionedclientset.Interface }
ClientBuilder allows you to get clients and configs for controllers.
type SimpleControllerClientBuilder ¶
type SimpleControllerClientBuilder struct { // ClientConfig is a skeleton config to clone and use as the basis for each controller client. ClientConfig *rest.Config }
SimpleControllerClientBuilder returns a fixed client with different user agents.
func (SimpleControllerClientBuilder) Client ¶
func (b SimpleControllerClientBuilder) Client(name string) (versionedclientset.Interface, error)
Client returns the complete client set for constructing clients.
func (SimpleControllerClientBuilder) ClientGoClient ¶
func (b SimpleControllerClientBuilder) ClientGoClient(name string) (versionedclientset.Interface, error)
ClientGoClient returns the complete client set for constructing clients.
func (SimpleControllerClientBuilder) ClientGoClientOrDie ¶
func (b SimpleControllerClientBuilder) ClientGoClientOrDie(name string) versionedclientset.Interface
ClientGoClientOrDie returns the complete client set for constructing clients.
func (SimpleControllerClientBuilder) ClientOrDie ¶
func (b SimpleControllerClientBuilder) ClientOrDie(name string) versionedclientset.Interface
ClientOrDie returns the complete client set for constructing clients.
func (SimpleControllerClientBuilder) Config ¶
func (b SimpleControllerClientBuilder) Config(name string) (*rest.Config, error)
Config returns a complete clientConfig for constructing clients.
func (SimpleControllerClientBuilder) ConfigOrDie ¶
func (b SimpleControllerClientBuilder) ConfigOrDie(name string) *rest.Config
ConfigOrDie returns a complete clientConfig for constructing clients.