Documentation ¶
Index ¶
- Variables
- func LoadConfig(configFile io.Reader) (string, error)
- type AuthenticationInfoResolver
- type AuthenticationInfoResolverFunc
- type AuthenticationInfoResolverWrapper
- type ClientManager
- func (cm *ClientManager) HookClient(h *v1beta1.Webhook) (*rest.RESTClient, error)
- func (cm *ClientManager) SetAuthenticationInfoResolver(resolver AuthenticationInfoResolver)
- func (cm *ClientManager) SetAuthenticationInfoResolverWrapper(wrapper AuthenticationInfoResolverWrapper)
- func (cm *ClientManager) SetNegotiatedSerializer(n runtime.NegotiatedSerializer)
- func (cm *ClientManager) SetServiceResolver(sr ServiceResolver)
- func (cm *ClientManager) Validate() error
- type ServiceResolver
Constants ¶
This section is empty.
Variables ¶
var (
ErrNeedServiceOrURL = errors.New("webhook configuration must have either service or URL")
)
Functions ¶
Types ¶
type AuthenticationInfoResolver ¶
AuthenticationInfoResolver builds rest.Config base on the server name.
func NewDefaultAuthenticationInfoResolver ¶
func NewDefaultAuthenticationInfoResolver(kubeconfigFile string) (AuthenticationInfoResolver, error)
NewDefaultAuthenticationInfoResolver generates an AuthenticationInfoResolver that builds rest.Config based on the kubeconfig file. kubeconfigFile is the path to the kubeconfig.
type AuthenticationInfoResolverFunc ¶
AuthenticationInfoResolverFunc implements AuthenticationInfoResolver.
func (AuthenticationInfoResolverFunc) ClientConfigFor ¶
func (a AuthenticationInfoResolverFunc) ClientConfigFor(server string) (*rest.Config, error)
ClientConfigFor implements AuthenticationInfoResolver.
type AuthenticationInfoResolverWrapper ¶
type AuthenticationInfoResolverWrapper func(AuthenticationInfoResolver) AuthenticationInfoResolver
AuthenticationInfoResolverWrapper can be used to inject Dial function to the rest.Config generated by the resolver.
type ClientManager ¶
type ClientManager struct {
// contains filtered or unexported fields
}
ClientManager builds REST clients to talk to webhooks. It caches the clients to avoid duplicate creation.
func NewClientManager ¶
func NewClientManager() (ClientManager, error)
NewClientManager creates a ClientManager.
func (*ClientManager) HookClient ¶
func (cm *ClientManager) HookClient(h *v1beta1.Webhook) (*rest.RESTClient, error)
HookClient get a RESTClient from the cache, or constructs one based on the webhook configuration.
func (*ClientManager) SetAuthenticationInfoResolver ¶
func (cm *ClientManager) SetAuthenticationInfoResolver(resolver AuthenticationInfoResolver)
SetAuthenticationInfoResolver sets the AuthenticationInfoResolver.
func (*ClientManager) SetAuthenticationInfoResolverWrapper ¶
func (cm *ClientManager) SetAuthenticationInfoResolverWrapper(wrapper AuthenticationInfoResolverWrapper)
SetAuthenticationInfoResolverWrapper sets the AuthenticationInfoResolverWrapper.
func (*ClientManager) SetNegotiatedSerializer ¶
func (cm *ClientManager) SetNegotiatedSerializer(n runtime.NegotiatedSerializer)
SetNegotiatedSerializer sets the NegotiatedSerializer.
func (*ClientManager) SetServiceResolver ¶
func (cm *ClientManager) SetServiceResolver(sr ServiceResolver)
SetServiceResolver sets the ServiceResolver.
func (*ClientManager) Validate ¶
func (cm *ClientManager) Validate() error
Validate checks if ClientManager is properly set up.
type ServiceResolver ¶
ServiceResolver knows how to convert a service reference into an actual location.
func NewDefaultServiceResolver ¶
func NewDefaultServiceResolver() ServiceResolver
Directories ¶
Path | Synopsis |
---|---|
apis
|
|
webhookadmission/install
Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery.
|
Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery. |
webhookadmission/v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
|
Package v1alpha1 is the v1alpha1 version of the API. |