Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartServer ¶
func StartServer(config *AdmissionConfig, insecure bool) error
Types ¶
type AdmissionConfig ¶
type KeyPair ¶
type KeyPair struct { PublicKey string PrivateKey string // contains filtered or unexported fields }
KeyPair represents a public/private key pair
func (*KeyPair) Key ¶
func (keyPair *KeyPair) Key() *rsa.PrivateKey
Key returns the RSA private key for this private key pair
type Webhook ¶
type Webhook struct { Rules []admissionregistrationv1.RuleWithOperations Callback WebhookCallback FailurePolicy admissionregistrationv1.FailurePolicyType // +optional Name string // +optional Path string // +optional }
type WebhookCallback ¶
type WebhookCallback func(*admissionv1.AdmissionRequest) (WebhookResponse, error)
type WebhookList ¶
type WebhookList []Webhook
type WebhookResponse ¶
type WebhookResponse struct { Allowed bool Code *int32 // +optional, ignored if allowed RejectionMessage *string // +optional, ignored if allowed }
func AllowRequest ¶
func AllowRequest(*admissionv1.AdmissionRequest) (WebhookResponse, error)
func NewAllowRequest ¶
func NewAllowRequest() WebhookResponse
func NewRejectRequest ¶
func NewRejectRequest() WebhookResponse
func RejectRequest ¶
func RejectRequest(*admissionv1.AdmissionRequest) (WebhookResponse, error)
func (WebhookResponse) WithCode ¶
func (r WebhookResponse) WithCode(code int32) WebhookResponse
func (WebhookResponse) WithMessage ¶
func (r WebhookResponse) WithMessage(message string) WebhookResponse
Click to show internal directories.
Click to hide internal directories.