Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWebhookVPA ¶
func NewWebhookVPA(ctx context.Context, webhookCtx *katalystbase.GenericContext, genericConf *generic.GenericConfiguration, _ *webhookconfig.GenericWebhookConfiguration, _ *webhookconfig.WebhooksConfiguration, metricsEmitter metrics.MetricEmitter, ) (kubewebhook.Webhook, webhookconsts.GenericStartFunc, error)
Types ¶
type WebhookVPA ¶
type WebhookVPA struct {
// contains filtered or unexported fields
}
WebhookVPA is the implementation of Kubernetes Webhook any implementation should at least implement the interface of mutating.Mutator of validating.Validator
func (*WebhookVPA) Run ¶
func (wa *WebhookVPA) Run() bool
func (*WebhookVPA) Validate ¶
func (wa *WebhookVPA) Validate(_ context.Context, obj metav1.Object) (bool, validating.ValidatorResult, error)
type WebhookVPAOverlapValidator ¶
type WebhookVPAOverlapValidator struct {
// contains filtered or unexported fields
}
WebhookVPAOverlapValidator validate if pod for one vpa overlap with other pods by checking their target reference
func NewWebhookVPAOverlapValidator ¶
func NewWebhookVPAOverlapValidator(vpaLister apiListers.KatalystVerticalPodAutoscalerLister) *WebhookVPAOverlapValidator
func (*WebhookVPAOverlapValidator) ValidateVPA ¶
func (wo *WebhookVPAOverlapValidator) ValidateVPA(vpa *apis.KatalystVerticalPodAutoscaler) (valid bool, message string, err error)
type WebhookVPAPodNameContainerNameValidator ¶
type WebhookVPAPodNameContainerNameValidator struct{}
WebhookVPAPodNameContainerNameValidator validate if pod name and container name in vpa are not empty
func NewWebhookVPAPodNameContainerNameValidator ¶
func NewWebhookVPAPodNameContainerNameValidator() *WebhookVPAPodNameContainerNameValidator
func (*WebhookVPAPodNameContainerNameValidator) ValidateVPA ¶
func (pc *WebhookVPAPodNameContainerNameValidator) ValidateVPA(vpa *apis.KatalystVerticalPodAutoscaler) (valid bool, message string, err error)
type WebhookVPAPolicyValidator ¶
type WebhookVPAPolicyValidator struct{}
WebhookVPAPolicyValidator validate: 1. if controlled resource are valid in vpa by checking if resource name in valuableControlledResourceMap 2. if MinAllowed <= MaxAllowed
func NewWebhookVPAPolicyValidator ¶
func NewWebhookVPAPolicyValidator() *WebhookVPAPolicyValidator
func (*WebhookVPAPolicyValidator) ValidateVPA ¶
func (vp *WebhookVPAPolicyValidator) ValidateVPA(vpa *apis.KatalystVerticalPodAutoscaler) (valid bool, message string, err error)
type WebhookVPAValidator ¶
type WebhookVPAValidator interface {
ValidateVPA(vpa *apis.KatalystVerticalPodAutoscaler) (valid bool, message string, err error)
}
Click to show internal directories.
Click to hide internal directories.