applicationconfiguration

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TraitTypeField is the special field indicate the type of the traitDefinition
	TraitTypeField = "name"
	// TraitSpecField indicate the spec of the trait in ApplicationConfiguration
	TraitSpecField = "properties"
)
View Source
const (

	// WorkloadNamePath indicates field path of workload name
	WorkloadNamePath = "metadata.name"
)

Variables

This section is empty.

Functions

func RegisterMutatingHandler added in v0.3.0

func RegisterMutatingHandler(mgr manager.Manager)

RegisterMutatingHandler will register component mutation handler to the webhook

func RegisterValidatingHandler added in v0.3.0

func RegisterValidatingHandler(mgr manager.Manager) error

RegisterValidatingHandler will register application configuration validation to webhook

func ValidateTraitObject added in v0.3.0

func ValidateTraitObject(obj *v1alpha2.ApplicationConfiguration) field.ErrorList

ValidateTraitObject validates the ApplicationConfiguration on creation/update

Types

type MutatingHandler added in v0.3.0

type MutatingHandler struct {
	Client client.Client

	// Decoder decodes objects
	Decoder *admission.Decoder
}

MutatingHandler handles Component

func (*MutatingHandler) Handle added in v0.3.0

Handle handles admission requests.

func (*MutatingHandler) InjectClient added in v0.3.0

func (h *MutatingHandler) InjectClient(c client.Client) error

InjectClient injects the client into the ComponentMutatingHandler

func (*MutatingHandler) InjectDecoder added in v0.3.0

func (h *MutatingHandler) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder into the ComponentMutatingHandler

func (*MutatingHandler) Mutate added in v0.3.0

Mutate sets all the default value for the Component

type ValidatingHandler

type ValidatingHandler struct {
	Client client.Client
	Mapper discoverymapper.DiscoveryMapper

	// Decoder decodes objects
	Decoder *admission.Decoder
}

ValidatingHandler handles CloneSet

func (*ValidatingHandler) Handle

Handle validate ApplicationConfiguration Spec here

func (*ValidatingHandler) InjectClient

func (h *ValidatingHandler) InjectClient(c client.Client) error

InjectClient injects the client into the ValidatingHandler

func (*ValidatingHandler) InjectDecoder

func (h *ValidatingHandler) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder into the ValidatingHandler

Jump to

Keyboard shortcuts

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