Documentation ¶
Index ¶
- Constants
- func RegisterMutatingHandler(mgr manager.Manager)
- func RegisterValidatingHandler(mgr manager.Manager) error
- func ValidateTraitObject(obj *v1alpha2.ApplicationConfiguration) field.ErrorList
- type MutatingHandler
- func (h *MutatingHandler) Handle(ctx context.Context, req admission.Request) admission.Response
- func (h *MutatingHandler) InjectClient(c client.Client) error
- func (h *MutatingHandler) InjectDecoder(d *admission.Decoder) error
- func (h *MutatingHandler) Mutate(obj *v1alpha2.ApplicationConfiguration) error
- type ValidatingHandler
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
RegisterMutatingHandler will register component mutation handler to the webhook
func RegisterValidatingHandler ¶ added in v0.3.0
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) 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
func (h *MutatingHandler) Mutate(obj *v1alpha2.ApplicationConfiguration) error
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) 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
Click to show internal directories.
Click to hide internal directories.