istio: Index | Files

package validation

import ""


Package Files

config.go endpoint.go monitoring.go validation.go webhook.go


var (
    // ErrorTag holds the error for the context.
    ErrorTag tag.Key

    // GroupTag holds the resource group for the context.
    GroupTag tag.Key

    // VersionTag holds the resource version for the context.
    VersionTag tag.Key

    // ResourceTag holds the resource name for the context.
    ResourceTag tag.Key

    // ReasonTag holds the error reason for the context.
    ReasonTag tag.Key

    // StatusTag holds the error code for the context.
    StatusTag tag.Key

func ReconcileWebhookConfiguration Uses

func ReconcileWebhookConfiguration(webhookServerReady, stopCh <-chan struct{},
    vc *WebhookParameters, kubeConfig string)

ReconcileWebhookConfiguration reconciles the ValidatingWebhookConfiguration when the webhook server is ready

func RunValidation Uses

func RunValidation(ready, stopCh chan struct{}, vc *WebhookParameters, kubeConfig string,
    livenessProbeController, readinessProbeController probe.Controller)

RunValidation start running Galley validation mode

type Webhook Uses

type Webhook struct {
    // contains filtered or unexported fields

Webhook implements the validating admission webhook for validating Istio configuration.

func NewWebhook Uses

func NewWebhook(p WebhookParameters) (*Webhook, error)

NewWebhook creates a new instance of the admission webhook controller.

func (*Webhook) Run Uses

func (wh *Webhook) Run(ready chan struct{}, stopCh <-chan struct{})

Run implements the webhook server

func (*Webhook) Stop Uses

func (wh *Webhook) Stop()

Stop the server

type WebhookConfigController Uses

type WebhookConfigController struct {
    // contains filtered or unexported fields

WebhookConfigController implements the validating admission webhook for validating Istio configuration.

func NewWebhookConfigController Uses

func NewWebhookConfigController(p WebhookParameters) (*WebhookConfigController, error)

NewWebhookConfigController manages validating webhook configuration.

type WebhookParameters Uses

type WebhookParameters struct {
    // MixerValidator implements the backend validator functions for mixer configuration.
    MixerValidator store.BackendValidator

    // PilotDescriptor provides a description of all pilot configuration resources.
    PilotDescriptor schema.Set

    // DomainSuffix is the DNS domain suffix for Pilot CRD resources,
    // e.g. cluster.local.
    DomainSuffix string

    // Port where the webhook is served. Per k8s admission
    // registration requirements this should be 443 unless there is
    // only a single port for the service.
    Port uint

    // CertFile is the path to the x509 certificate for https.
    CertFile string

    // KeyFile is the path to the x509 private key matching `CertFile`.
    KeyFile string

    // WebhookConfigFile is the path to the validatingwebhookconfiguration
    // file that should be used for self-registration.
    WebhookConfigFile string

    // CACertFile is the path to the x509 CA bundle file.
    CACertFile string

    // DeploymentAndServiceNamespace is the namespace in which the validation deployment and service resides.
    DeploymentAndServiceNamespace string

    // Name of the k8s validatingwebhookconfiguration
    WebhookName string

    // DeploymentName is the name of the validation deployment. This, along with
    // DeploymentAndServiceNamespace, is used to set the ownerReference in the
    // validatingwebhookconfiguration. This enables k8s to clean-up the cluster-scoped
    // validatingwebhookconfiguration when the deployment is deleted.
    DeploymentName string

    // ServiceName is the name of the k8s service of the validation webhook. This is
    // used to verify endpoint readiness before registering the validatingwebhookconfiguration.
    ServiceName string

    Clientset clientset.Interface

    // Enable galley validation mode
    EnableValidation bool

    // Enable reconcile validatingwebhookconfiguration
    EnableReconcileWebhookConfiguration bool

WebhookParameters contains the configuration for the Istio Pilot validation admission controller.

func DefaultArgs Uses

func DefaultArgs() *WebhookParameters

DefaultArgs allocates an WebhookParameters struct initialized with Webhook's default configuration.

func (*WebhookParameters) String Uses

func (p *WebhookParameters) String() string

String produces a stringified version of the arguments for debugging.

func (*WebhookParameters) Validate Uses

func (args *WebhookParameters) Validate() error

Validate tests if the WebhookParameters has valid params.

Package validation imports 49 packages (graph) and is imported by 4 packages. Updated 2019-10-14. Refresh now. Tools for package owners.