Documentation ¶
Index ¶
- Variables
- func DelPreValiationCfg20(clt client.Client) error
- func GenerateWebhookCerts(certDir, webhookServiceNs, webhookServiceName string) ([]byte, error)
- func GetValidatorName(wbhName string) string
- func GetWebHookServiceName(wbhName string) string
- type Certificate
- type ChannelValidator
- type CleanUpFunc
- type WireUp
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidateLogic = func(w *WireUp) { w.Handler = &ChannelValidator{Client: w.mgr.GetClient(), Logger: w.Logger} }
ValidateLogic add ChannelValidator to webhook wireup
Functions ¶
func DelPreValiationCfg20 ¶
func GenerateWebhookCerts ¶
GenerateWebhookCerts generate self singed CA and a signed cert pair. The signed pair is stored at the certDir. The CA will respect the inCluster DNS
func GetValidatorName ¶
func GetWebHookServiceName ¶
Types ¶
type Certificate ¶
Certificate defines a typical cert structure
func GenerateSelfSignedCACert ¶
func GenerateSelfSignedCACert(cn string) (Certificate, error)
GenerateSelfSignedCACert generates a self signed CA
func GenerateSignedCert ¶
func GenerateSignedCert(cn string, alternateDNS []string, ca Certificate) (Certificate, error)
GenerateSignedCert generated cert pair which is signed by the self signed CA
type ChannelValidator ¶
type ChannelValidator struct { logr.Logger client.Client // contains filtered or unexported fields }
func (*ChannelValidator) Handle ¶
ChannelValidator admits a channel if a specific channel can co-exit in the requested namespace.
func (*ChannelValidator) InjectDecoder ¶
func (v *ChannelValidator) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder.
type CleanUpFunc ¶
type WireUp ¶
type WireUp struct { Server *webhook.Server Handler webhook.AdmissionHandler CertDir string logr.Logger WebhookName string WebHookPort int WebHookeSvcKey types.NamespacedName WebHookServicePort int ValidtorPath string DeployLabel string DeploymentSelector map[string]string // contains filtered or unexported fields }
func (*WireUp) WireUpWebhookSupplymentryResource ¶
func (w *WireUp) WireUpWebhookSupplymentryResource(caCert []byte, gvk schema.GroupVersionKind, ops []admissionv1.OperationType, cFuncs ...CleanUpFunc) error
assuming we have a service set up for the webhook, and the service is linking to a secret which has the CA
Click to show internal directories.
Click to hide internal directories.