Documentation ¶
Index ¶
Constants ¶
const MaxRequestBodyBytes = int64(6 * 1024 * 1024)
MaxRequestBodyBytes represents the max size of Kubernetes objects we read. Kubernetes allows a 2x buffer on the max etcd size (https://github.com/kubernetes/kubernetes/blob/0afa569499d480df4977568454a50790891860f5/staging/src/k8s.io/apiserver/pkg/server/config.go#L362). We allow an additional 2x buffer, as it is still fairly cheap (6mb) Taken from https://github.com/istio/istio/commit/6ca5055a4db6695ef5504eabdfde3799f2ea91fd
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPErrorModel ¶
type MetricsHandlers ¶
type MetricsHandlers struct {
Prometheus *ginprom.Prometheus
}
MetricsHandlers encapsulates properties required to setup metrics endpoints.
func (*MetricsHandlers) SetupMetricsHandlers ¶
func (mh *MetricsHandlers) SetupMetricsHandlers(router *gin.Engine) error
SetupMetricsHandlers registers http handlers for metrics endpoints.
type WebhookHandlers ¶
type WebhookHandlers struct {
// contains filtered or unexported fields
}
WebhookHandlers encapsulates properties required to setup webhook http handlers.
func NewWebhookHandlers ¶
func NewWebhookHandlers(logger *slog.Logger, mutator *mutation.Mutator) *WebhookHandlers
func (*WebhookHandlers) MutateHandler ¶
func (wh *WebhookHandlers) MutateHandler(context *gin.Context)
func (*WebhookHandlers) SetupWebhookHandlers ¶
func (wh *WebhookHandlers) SetupWebhookHandlers(router *gin.Engine) error
SetupWebhookHandlers registers webhook related http handlers.