generate

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 36 Imported by: 1

Documentation

Index

Constants

View Source
const (
	//Skip : failed to process rule, will not update the resource
	Skip ResourceMode = "SKIP"
	//Create : create a new resource
	Create = "CREATE"
	//Update : update/overwrite the new resource
	Update = "UPDATE"
)

Variables

This section is empty.

Functions

func ValidateResourceWithPattern

func ValidateResourceWithPattern(log logr.Logger, resource, pattern interface{}) (string, error)

ValidateResourceWithPattern is a start of element-by-element validation process It assumes that validation is started from root, so "/" is passed Anchors are not expected in the pattern

Types

type GenerateController

type GenerateController struct {
	Config config.Configuration
	// contains filtered or unexported fields
}

func NewGenerateController

func NewGenerateController(
	kyvernoClient kyvernoclient.Interface,
	client dclient.Interface,
	policyLister kyvernolister.ClusterPolicyLister,
	npolicyLister kyvernolister.PolicyLister,
	urLister urlister.UpdateRequestNamespaceLister,
	eventGen event.Interface,
	nsLister corelister.NamespaceLister,
	log logr.Logger,
	dynamicConfig config.Configuration,
) (*GenerateController, error)

NewGenerateController returns an instance of the Generate-Request Controller

func (*GenerateController) ProcessUR

type Handler

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

func NewHandler

func NewHandler(element string, pattern interface{}, path string) Handler

func (Handler) Handle

func (dh Handler) Handle(handler resourceElementHandler, resourceMap map[string]interface{}, originPattern interface{}) (string, error)

type ResourceMode

type ResourceMode string

ResourceMode defines the mode for generated resource

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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