Documentation ¶
Index ¶
- Constants
- type ResourceWebhookRegister
- type WebhookRegistrationClient
- func (wrc *WebhookRegistrationClient) CreateResourceMutatingWebhookConfiguration() error
- func (wrc *WebhookRegistrationClient) CreateResourceValidatingWebhookConfiguration() error
- func (wrc *WebhookRegistrationClient) GetResourceMutatingWebhookConfigName() string
- func (wrc *WebhookRegistrationClient) GetResourceValidatingWebhookConfigName() string
- func (wrc *WebhookRegistrationClient) GetWebhookTimeOut() time.Duration
- func (wrc *WebhookRegistrationClient) Register() error
- func (wrc *WebhookRegistrationClient) RemoveResourceMutatingWebhookConfiguration() error
- func (wrc *WebhookRegistrationClient) RemoveResourceValidatingWebhookConfiguration() error
- func (wrc *WebhookRegistrationClient) RemoveWebhookConfigurations(cleanUp chan<- struct{})
Constants ¶
const ( //MutatingWebhookConfigurationKind defines the kind for MutatingWebhookConfiguration MutatingWebhookConfigurationKind string = "MutatingWebhookConfiguration" //ValidatingWebhookConfigurationKind defines the kind for ValidatingWebhookConfiguration ValidatingWebhookConfigurationKind string = "ValidatingWebhookConfiguration" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceWebhookRegister ¶ added in v1.1.0
type ResourceWebhookRegister struct { LastReqTime *checker.LastReqTime RunValidationInMutatingWebhook string // contains filtered or unexported fields }
ResourceWebhookRegister manages the resource webhook registration
func NewResourceWebhookRegister ¶ added in v1.1.0
func NewResourceWebhookRegister( lastReqTime *checker.LastReqTime, mconfigwebhookinformer mconfiginformer.MutatingWebhookConfigurationInformer, vconfigwebhookinformer mconfiginformer.ValidatingWebhookConfigurationInformer, webhookRegistrationClient *WebhookRegistrationClient, runValidationInMutatingWebhook string, log logr.Logger, ) *ResourceWebhookRegister
NewResourceWebhookRegister returns a new instance of ResourceWebhookRegister manager
func (*ResourceWebhookRegister) RegisterResourceWebhook ¶ added in v1.1.0
func (rww *ResourceWebhookRegister) RegisterResourceWebhook()
RegisterResourceWebhook registers a resource webhook
func (*ResourceWebhookRegister) RemoveResourceWebhookConfiguration ¶ added in v1.1.0
func (rww *ResourceWebhookRegister) RemoveResourceWebhookConfiguration() error
RemoveResourceWebhookConfiguration removes the resource webhook configurations
func (*ResourceWebhookRegister) Run ¶ added in v1.1.0
func (rww *ResourceWebhookRegister) Run(stopCh <-chan struct{})
Run starts the ResourceWebhookRegister manager
type WebhookRegistrationClient ¶
type WebhookRegistrationClient struct {
// contains filtered or unexported fields
}
WebhookRegistrationClient is client for registration webhooks on cluster
func NewWebhookRegistrationClient ¶
func NewWebhookRegistrationClient( clientConfig *rest.Config, client *client.Client, serverIP string, webhookTimeout int32, log logr.Logger) *WebhookRegistrationClient
NewWebhookRegistrationClient creates new WebhookRegistrationClient instance
func (*WebhookRegistrationClient) CreateResourceMutatingWebhookConfiguration ¶ added in v0.9.0
func (wrc *WebhookRegistrationClient) CreateResourceMutatingWebhookConfiguration() error
CreateResourceMutatingWebhookConfiguration create a Mutatingwebhookconfiguration resource for all resource type used to forward request to kyverno webhooks to apply policeis Mutationg webhook is be used for Mutating purpose
func (*WebhookRegistrationClient) CreateResourceValidatingWebhookConfiguration ¶ added in v1.1.3
func (wrc *WebhookRegistrationClient) CreateResourceValidatingWebhookConfiguration() error
CreateResourceValidatingWebhookConfiguration ...
func (*WebhookRegistrationClient) GetResourceMutatingWebhookConfigName ¶ added in v1.1.0
func (wrc *WebhookRegistrationClient) GetResourceMutatingWebhookConfigName() string
GetResourceMutatingWebhookConfigName returns the webhook configuration name
func (*WebhookRegistrationClient) GetResourceValidatingWebhookConfigName ¶ added in v1.1.3
func (wrc *WebhookRegistrationClient) GetResourceValidatingWebhookConfigName() string
GetResourceValidatingWebhookConfigName returns the webhook configuration name
func (*WebhookRegistrationClient) GetWebhookTimeOut ¶ added in v1.1.6
func (wrc *WebhookRegistrationClient) GetWebhookTimeOut() time.Duration
GetWebhookTimeOut returns the value of webhook timeout
func (*WebhookRegistrationClient) Register ¶
func (wrc *WebhookRegistrationClient) Register() error
Register creates admission webhooks configs on cluster
func (*WebhookRegistrationClient) RemoveResourceMutatingWebhookConfiguration ¶ added in v0.9.0
func (wrc *WebhookRegistrationClient) RemoveResourceMutatingWebhookConfiguration() error
RemoveResourceMutatingWebhookConfiguration removes mutating webhook configuration for all resources
func (*WebhookRegistrationClient) RemoveResourceValidatingWebhookConfiguration ¶ added in v1.1.3
func (wrc *WebhookRegistrationClient) RemoveResourceValidatingWebhookConfiguration() error
RemoveResourceValidatingWebhookConfiguration deletes an existing webhook configuration
func (*WebhookRegistrationClient) RemoveWebhookConfigurations ¶ added in v1.1.0
func (wrc *WebhookRegistrationClient) RemoveWebhookConfigurations(cleanUp chan<- struct{})
RemoveWebhookConfigurations removes webhook configurations for reosurces and policy called during webhook server shutdown