Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // HandlerMap contains admission webhook handlers HandlerMap = map[string]admission.Handler{ "mutate-apps-kruise-io-v1alpha1-cloneset": &WorkloadHandler{}, "mutate-apps-v1-deployment": &WorkloadHandler{}, } )
Functions ¶
This section is empty.
Types ¶
type WorkloadHandler ¶
type WorkloadHandler struct {
// To use the client, you need to do the following:
// - uncomment it
// - import sigs.k8s.io/controller-runtime/pkg/client
// - uncomment the InjectClient method at the bottom of this file.
Client client.Client
// Decoder decodes objects
Decoder *admission.Decoder
Finder *util.ControllerFinder
}
WorkloadHandler handles Pod
func (*WorkloadHandler) Handle ¶
Handle handles admission requests.
TODO Currently there is an implicit condition for rollout: the workload must be currently in a stable version (only one version of Pods), if not, it will not enter the rollout process. There is an additional problem here, the user may not be aware of this. when user does a release and thinks it enters the rollout process, but due to the implicit condition above, it actually goes through the normal release process. No good idea to solve this problem has been found yet.
func (*WorkloadHandler) InjectClient ¶
func (h *WorkloadHandler) InjectClient(c client.Client) error
InjectClient injects the client into the WorkloadHandler
func (*WorkloadHandler) InjectDecoder ¶
func (h *WorkloadHandler) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder into the WorkloadHandler
Click to show internal directories.
Click to hide internal directories.