strategy

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Registry = NewRegistry()

Functions

This section is empty.

Types

type StrategyAdmissionHook added in v1.2.0

type StrategyAdmissionHook struct {
	// contains filtered or unexported fields
}

StrategyAdmissionHook is a admission webhook based on the registered strategies in the given registry

func NewStrategyAdmissionHook added in v1.2.0

func NewStrategyAdmissionHook(registry *StrategyRegistry) *StrategyAdmissionHook

func (*StrategyAdmissionHook) Admit added in v1.2.0

func (*StrategyAdmissionHook) Initialize added in v1.2.0

func (w *StrategyAdmissionHook) Initialize(cfg *rest.Config, stopCh <-chan struct{}) error

func (*StrategyAdmissionHook) MutatingResource added in v1.2.0

func (w *StrategyAdmissionHook) MutatingResource() (plural schema.GroupVersionResource, singular string)

func (*StrategyAdmissionHook) Validate added in v1.2.0

func (*StrategyAdmissionHook) ValidatingResource added in v1.2.0

func (w *StrategyAdmissionHook) ValidatingResource() (plural schema.GroupVersionResource, singular string)

type StrategyRegistry

type StrategyRegistry struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

StrategyRegistry maintain the map of resource GVK to its CreateUpdateStrategy TODO: automate the registration of ValidatingAdmissionWebhook and MutatingAdmissionWebhook based on this registry

func NewRegistry

func NewRegistry() StrategyRegistry

func (*StrategyRegistry) Get

func (*StrategyRegistry) Register

func (r *StrategyRegistry) Register(strategy registry.CreateUpdateStrategy)

Jump to

Keyboard shortcuts

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