...

Package webhook

import "k8s.io/kubernetes/test/images/agnhost/webhook"
Overview
Index

Overview ▾

Variables

CmdWebhook is used by agnhost Cobra.

var CmdWebhook = &cobra.Command{
    Use:   "webhook",
    Short: "Starts a HTTP server, useful for testing MutatingAdmissionWebhook and ValidatingAdmissionWebhook",
    Long: `Starts a HTTP server, useful for testing MutatingAdmissionWebhook and ValidatingAdmissionWebhook.
After deploying it to Kubernetes cluster, the Administrator needs to create a ValidatingWebhookConfiguration
in the Kubernetes cluster to register remote webhook admission controllers.`,
    Args: cobra.MaximumNArgs(0),
    Run:  main,
}

type Config

Config contains the server (the webhook) cert and key.

type Config struct {
    CertFile string
    KeyFile  string
}