server

package
v4.5.2003+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2020 License: Apache-2.0 Imports: 31 Imported by: 0

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

type Config

type Config struct {
	Enable bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL