Documentation
¶
Index ¶
- Constants
- func ParseHTTPRequest(r *http.Request) (admissionctl.Request, admissionctl.Response, error)
- func SendResponse(w io.Writer, resp admissionctl.Response)
- type Dispatcher
- type InstasliceWebhook
- func (s *InstasliceWebhook) Authorized(request admissionctl.Request) admissionctl.Response
- func (s *InstasliceWebhook) GetHealthzURI() string
- func (s *InstasliceWebhook) GetReadinessURI() string
- func (s *InstasliceWebhook) GetURI() string
- func (s *InstasliceWebhook) Name() string
- func (s *InstasliceWebhook) Validate(req admissionctl.Request) bool
- type Webhook
Constants ¶
View Source
const ( URI string = "/mutate-pod" ReadinessEndpointURI string = "/readyz" HealthzEndpointURI string = "/healthz" WebhookName string = "das-webhook" )
Variables ¶
This section is empty.
Functions ¶
func ParseHTTPRequest ¶
func ParseHTTPRequest(r *http.Request) (admissionctl.Request, admissionctl.Response, error)
func SendResponse ¶
func SendResponse(w io.Writer, resp admissionctl.Response)
SendResponse Send the AdmissionReview.
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher struct
func (*Dispatcher) HandleHealthz ¶
func (d *Dispatcher) HandleHealthz(w http.ResponseWriter, r *http.Request)
func (*Dispatcher) HandleReadiness ¶
func (d *Dispatcher) HandleReadiness(w http.ResponseWriter, r *http.Request)
func (*Dispatcher) HandleRequest ¶
func (d *Dispatcher) HandleRequest(w http.ResponseWriter, r *http.Request)
HandleRequest http request
type InstasliceWebhook ¶
type InstasliceWebhook struct{}
func (*InstasliceWebhook) Authorized ¶
func (s *InstasliceWebhook) Authorized(request admissionctl.Request) admissionctl.Response
Authorized implements Webhook interface
func (*InstasliceWebhook) GetHealthzURI ¶
func (s *InstasliceWebhook) GetHealthzURI() string
GetHealthzURI() implements Webhook interface
func (*InstasliceWebhook) GetReadinessURI ¶
func (s *InstasliceWebhook) GetReadinessURI() string
GetReadinessURI implements Webhook interface
func (*InstasliceWebhook) GetURI ¶
func (s *InstasliceWebhook) GetURI() string
GetURI implements Webhook interface
func (*InstasliceWebhook) Name ¶
func (s *InstasliceWebhook) Name() string
Name implements Webhook interface
func (*InstasliceWebhook) Validate ¶
func (s *InstasliceWebhook) Validate(req admissionctl.Request) bool
Validate if the incoming request even valid
type Webhook ¶
type Webhook interface {
// Authorized will determine if the request is allowed
Authorized(request admissionctl.Request) admissionctl.Response
// GetURI returns the URI for the webhook
GetURI() string
// GetReadiness URI returns the URI for the webhook
GetReadinessURI() string
// GetHealthzURI() returns the URI for the webhook
GetHealthzURI() string
// Name is the name of the webhook
Name() string
}
Webhook interface
func NewWebhook ¶
func NewWebhook() Webhook
Click to show internal directories.
Click to hide internal directories.