Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultPodMutatePatchValdationFunction = admission_controller_utils.ValidatePatchFunc(func(patch jsonpatch.JsonPatchOperation) error { return nil }) OKD3_9tPodMutatePatchValdationFunction = admission_controller_utils.ValidatePatchFunc(func(patch jsonpatch.JsonPatchOperation) error { allowedPatchOperations := map[string]bool{ "add": true, } if allowed, exist := allowedPatchOperations[patch.Operation]; !exist || !allowed { return errors.Errorf("cannot patch with operation %s", patch.Operation) } return nil }) )
Functions ¶
func NewControllerPodResourceRecommendation ¶
func NewControllerPodResourceRecommendation() *controllerRecommendation
Types ¶
type AdmissionController ¶
type AdmissionController interface {
MutatePod(http.ResponseWriter, *http.Request)
}
func NewAdmissionControllerWithConfig ¶
func NewAdmissionControllerWithConfig(cfg Config, sigsK8SClient client.Client, datahubClient datahub_client.DatahubServiceClient, podMutatePatchValdationFunction admission_controller_utils.ValidatePatchFunc, clusterID string) (AdmissionController, error)
NewAdmissionControllerWithConfig creates AdmissionController with configuration and dependencies
Click to show internal directories.
Click to hide internal directories.