Documentation ¶
Index ¶
- Variables
- func RegisterPodMutatingWebhookFlags(pflags *pflag.FlagSet)
- func SelectPriorityPSTS(pstsList []*networkv1alpha1.PodSubnetTopologySpread, label labels.Labels) *networkv1alpha1.PodSubnetTopologySpread
- type MutatingPodHandler
- func (h *MutatingPodHandler) Handle(ctx context.Context, req admission.Request) admission.Response
- func (h *MutatingPodHandler) InjectCNIMode(cniMode types.ContainerNetworkMode) error
- func (h *MutatingPodHandler) InjectCRDClient(crdClient versioned.Interface) error
- func (h *MutatingPodHandler) InjectCloudClient(bceClient cloud.Interface) error
- func (h *MutatingPodHandler) InjectDecoder(d *admission.Decoder) error
- func (h *MutatingPodHandler) InjectNetworkInformer(networkInformer crdinformers.SharedInformerFactory) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // HandlerMap contains admission webhook handlers HandlerMap = map[string]admission.Handler{ "mutating-pod-subnet-topology-spread": &MutatingPodHandler{}, } )
Functions ¶
func SelectPriorityPSTS ¶
func SelectPriorityPSTS(pstsList []*networkv1alpha1.PodSubnetTopologySpread, label labels.Labels) *networkv1alpha1.PodSubnetTopologySpread
Select the highest priority and matching pSTS object label: pod labels to be mached pstsList: list of PodSubnetTopologySpread return: - nil: if no PodSubnetTopologySpread matched - psts: the highest priority PodSubnetTopologySpread object
Types ¶
type MutatingPodHandler ¶
type MutatingPodHandler struct { // Decoder decodes objects Decoder *admission.Decoder // contains filtered or unexported fields }
func (*MutatingPodHandler) InjectCNIMode ¶
func (h *MutatingPodHandler) InjectCNIMode(cniMode types.ContainerNetworkMode) error
func (*MutatingPodHandler) InjectCRDClient ¶
func (h *MutatingPodHandler) InjectCRDClient(crdClient versioned.Interface) error
func (*MutatingPodHandler) InjectCloudClient ¶
func (h *MutatingPodHandler) InjectCloudClient(bceClient cloud.Interface) error
func (*MutatingPodHandler) InjectDecoder ¶
func (h *MutatingPodHandler) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder into the PodCreateHandler
func (*MutatingPodHandler) InjectNetworkInformer ¶
func (h *MutatingPodHandler) InjectNetworkInformer(networkInformer crdinformers.SharedInformerFactory) error
Click to show internal directories.
Click to hide internal directories.