applicationrollout

package
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultAppRollout

func DefaultAppRollout(obj *v1beta1.AppRollout)

DefaultAppRollout will set the default value for the AppRollout®

func FindCommonComponent

func FindCommonComponent(targetApp, sourceApp []*types.ComponentManifest) []string

FindCommonComponent finds the common components in both the source and target application only used for rollout webhook, will delete after refactor rollout webhook

func FindCommonComponentWithManifest added in v1.1.0

func FindCommonComponentWithManifest(target, source map[string]*unstructured.Unstructured) []string

FindCommonComponentWithManifest finds the common components in both the source and target workloads the source can be nil

func RegisterMutatingHandler

func RegisterMutatingHandler(mgr manager.Manager)

RegisterMutatingHandler will register component mutation handler to the webhook

func RegisterValidatingHandler

func RegisterValidatingHandler(mgr manager.Manager)

RegisterValidatingHandler will register application configuration validation to webhook

Types

type MutatingHandler

type MutatingHandler struct {
	Client client.Client

	// Decoder decodes objects
	Decoder *admission.Decoder
}

MutatingHandler handles AppRollout

func (*MutatingHandler) Handle

Handle handles admission requests.

func (*MutatingHandler) InjectClient

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

InjectClient injects the client into the MutatingHandler

func (*MutatingHandler) InjectDecoder

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

InjectDecoder injects the decoder into the MutatingHandler

type ValidatingHandler

type ValidatingHandler struct {
	client.Client

	// Decoder decodes objects
	Decoder *admission.Decoder
}

ValidatingHandler handles AppRollout

func (*ValidatingHandler) Handle

Handle handles admission requests.

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

func (*ValidatingHandler) ValidateCreate

func (h *ValidatingHandler) ValidateCreate(appRollout *v1beta1.AppRollout) field.ErrorList

ValidateCreate validates the AppRollout on creation

func (*ValidatingHandler) ValidateUpdate

func (h *ValidatingHandler) ValidateUpdate(new, old *v1beta1.AppRollout) field.ErrorList

ValidateUpdate validates the AppRollout on update

Jump to

Keyboard shortcuts

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