apiserver: k8s.io/apiserver/pkg/admission/plugin/webhook Index | Files | Directories

package webhook

import "k8s.io/apiserver/pkg/admission/plugin/webhook"

Index

Package Files

accessors.go

type WebhookAccessor Uses

type WebhookAccessor interface {
    // GetUID gets a string that uniquely identifies the webhook.
    GetUID() string

    // GetConfigurationName gets the name of the webhook configuration that owns this webhook.
    GetConfigurationName() string

    // GetRESTClient gets the webhook client
    GetRESTClient(clientManager *webhookutil.ClientManager) (*rest.RESTClient, error)
    // GetParsedNamespaceSelector gets the webhook NamespaceSelector field.
    GetParsedNamespaceSelector() (labels.Selector, error)
    // GetParsedObjectSelector gets the webhook ObjectSelector field.
    GetParsedObjectSelector() (labels.Selector, error)

    // GetName gets the webhook Name field. Note that the name is scoped to the webhook
    // configuration and does not provide a globally unique identity, if a unique identity is
    // needed, use GetUID.
    GetName() string
    // GetClientConfig gets the webhook ClientConfig field.
    GetClientConfig() v1.WebhookClientConfig
    // GetRules gets the webhook Rules field.
    GetRules() []v1.RuleWithOperations
    // GetFailurePolicy gets the webhook FailurePolicy field.
    GetFailurePolicy() *v1.FailurePolicyType
    // GetMatchPolicy gets the webhook MatchPolicy field.
    GetMatchPolicy() *v1.MatchPolicyType
    // GetNamespaceSelector gets the webhook NamespaceSelector field.
    GetNamespaceSelector() *metav1.LabelSelector
    // GetObjectSelector gets the webhook ObjectSelector field.
    GetObjectSelector() *metav1.LabelSelector
    // GetSideEffects gets the webhook SideEffects field.
    GetSideEffects() *v1.SideEffectClass
    // GetTimeoutSeconds gets the webhook TimeoutSeconds field.
    GetTimeoutSeconds() *int32
    // GetAdmissionReviewVersions gets the webhook AdmissionReviewVersions field.
    GetAdmissionReviewVersions() []string

    // GetMutatingWebhook if the accessor contains a MutatingWebhook, returns it and true, else returns false.
    GetMutatingWebhook() (*v1.MutatingWebhook, bool)
    // GetValidatingWebhook if the accessor contains a ValidatingWebhook, returns it and true, else returns false.
    GetValidatingWebhook() (*v1.ValidatingWebhook, bool)
}

WebhookAccessor provides a common interface to both mutating and validating webhook types.

func NewMutatingWebhookAccessor Uses

func NewMutatingWebhookAccessor(uid, configurationName string, h *v1.MutatingWebhook) WebhookAccessor

NewMutatingWebhookAccessor creates an accessor for a MutatingWebhook.

func NewValidatingWebhookAccessor Uses

func NewValidatingWebhookAccessor(uid, configurationName string, h *v1.ValidatingWebhook) WebhookAccessor

NewValidatingWebhookAccessor creates an accessor for a ValidatingWebhook.

Directories

PathSynopsis
config
config/apis/webhookadmission
config/apis/webhookadmission/installPackage install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery.
config/apis/webhookadmission/v1Package v1 is the v1 version of the API.
config/apis/webhookadmission/v1alpha1Package v1alpha1 is the v1alpha1 version of the API.
errorsPackage errors contains utilities for admission webhook specific errors
generic
initializer
mutatingPackage mutating delegates admission checks to dynamically configured mutating webhooks.
namespacePackage namespace defines the utilities that are used by the webhook plugin to decide if a webhook should be applied to an object based on its namespace.
objectPackage object defines the utilities that are used by the webhook plugin to decide if a webhook should run, as long as either the old object or the new object has labels matching the webhook config's objectSelector.
requestPackage request creates admissionReview request based on admission attributes.
rules
testcertsPackage testcerts contains generated key pairs used by the unit tests of mutating and validating webhooks.
testing
testing/main
util
validatingPackage validating makes calls to validating (i.e., non-mutating) webhooks during the admission process.

Package webhook imports 6 packages (graph) and is imported by 11 packages. Updated 2019-11-18. Refresh now. Tools for package owners.