Documentation
¶
Index ¶
- Variables
- func GetPSTSStrategy(psts *networkingv1alpha1.PodSubnetTopologySpread) *networkingv1alpha1.IPAllocationStrategy
- func GetPodSubnetTopologySpreadName(pod *corev1.Pod) string
- func GetReleaseStrategy(psts *networkingv1alpha1.PodSubnetTopologySpread) networkingv1alpha1.ReleaseStrategy
- func ISCustomReuseModeWEP(wep *networkingv1alpha1.WorkloadEndpoint) bool
- func IsCustomMode(psts *networkingv1alpha1.PodSubnetTopologySpread) bool
- func IsElasticMode(psts *networkingv1alpha1.PodSubnetTopologySpread) bool
- func IsEndWithNum(name string) bool
- func IsFixIPStatefulSetPodWep(wep *networkingv1alpha1.WorkloadEndpoint) bool
- func IsFixedIPMode(psts *networkingv1alpha1.PodSubnetTopologySpread) bool
- func IsManualMode(psts *networkingv1alpha1.PodSubnetTopologySpread) bool
- func IsReuseIPCustomPSTS(psts *networkingv1alpha1.PodSubnetTopologySpread) bool
- func IsSubnetTopologySpreadPod(pod *corev1.Pod) bool
- func NeedReleaseReuseModeWEP(wep *networkingv1alpha1.WorkloadEndpoint) bool
- func OwnerByPodSubnetTopologySpread(wep *networkingv1alpha1.WorkloadEndpoint, ...) bool
- func PSTSContainsAvailableSubnet(psts *networkingv1alpha1.PodSubnetTopologySpread) bool
- func PSTSMode(psts *networkingv1alpha1.PodSubnetTopologySpread) (*networkingv1alpha1.IPAllocationStrategy, bool)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AnnotationCCEPrefix = "cce.baidubce.com/" // annotation for PodSubnetTopologySpread AnnotationPodSubnetTopologySpread = AnnotationCCEPrefix + "PodSubnetTopologySpread" // cce defined k8s resource name ResourceIPForNode = corev1.ResourceName(AnnotationCCEPrefix + "ip") ResourceENIForNode = corev1.ResourceName(AnnotationCCEPrefix + "eni") // CrossVPCEni resource name ResourceCrossVPCEni = corev1.ResourceName("cross-vpc-eni.cce.io/eni") // topodlogy key for psts TopologyKeyOfPod = "topology.kubernetes.io/zone" // AnnotationDisablePSTSPodAffinity This annotation is included on the pod, which means that the pod does not expect to use the scheduling function extended by pSTS AnnotationDisablePSTSPodAffinity = AnnotationCCEPrefix + "DisablePodSubnetTopologySpreadScheduler" )
Functions ¶
func GetPSTSStrategy ¶ added in v1.6.12
func GetPSTSStrategy(psts *networkingv1alpha1.PodSubnetTopologySpread) *networkingv1alpha1.IPAllocationStrategy
GetPSTSStrategy Recursively obtain the IP application policy
func GetReleaseStrategy ¶
func GetReleaseStrategy(psts *networkingv1alpha1.PodSubnetTopologySpread) networkingv1alpha1.ReleaseStrategy
GetReleaseStrategy defaults to release strategy is TTL
func ISCustomReuseModeWEP ¶ added in v1.6.12
func ISCustomReuseModeWEP(wep *networkingv1alpha1.WorkloadEndpoint) bool
IsCustomReuseModeWEP WorkloadEndpoint type is custom
func IsCustomMode ¶ added in v1.6.12
func IsCustomMode(psts *networkingv1alpha1.PodSubnetTopologySpread) bool
IsCustomMode psts type is custom
func IsElasticMode ¶
func IsElasticMode(psts *networkingv1alpha1.PodSubnetTopologySpread) bool
func IsEndWithNum ¶
func IsFixIPStatefulSetPodWep ¶ added in v1.6.12
func IsFixIPStatefulSetPodWep(wep *networkingv1alpha1.WorkloadEndpoint) bool
func IsFixedIPMode ¶
func IsFixedIPMode(psts *networkingv1alpha1.PodSubnetTopologySpread) bool
func IsManualMode ¶
func IsManualMode(psts *networkingv1alpha1.PodSubnetTopologySpread) bool
func IsReuseIPCustomPSTS ¶ added in v1.6.12
func IsReuseIPCustomPSTS(psts *networkingv1alpha1.PodSubnetTopologySpread) bool
IsReuseIPCustomPSTS whether to enable the reuse IP mode
func IsSubnetTopologySpreadPod ¶
Whether pod complies with the topology distribution of pod subnet
func NeedReleaseReuseModeWEP ¶ added in v1.6.12
func NeedReleaseReuseModeWEP(wep *networkingv1alpha1.WorkloadEndpoint) bool
func OwnerByPodSubnetTopologySpread ¶
func OwnerByPodSubnetTopologySpread(wep *networkingv1alpha1.WorkloadEndpoint, psts *networkingv1alpha1.PodSubnetTopologySpread) bool
func PSTSContainsAvailableSubnet ¶
func PSTSContainsAvailableSubnet(psts *networkingv1alpha1.PodSubnetTopologySpread) bool
PSTSContainsAvailableSubnet whatever length of the available subnet of psts greater than 0
func PSTSMode ¶ added in v1.6.12
func PSTSMode(psts *networkingv1alpha1.PodSubnetTopologySpread) (*networkingv1alpha1.IPAllocationStrategy, bool)
PSTSMode slecte mod of psts and return true if a available subnet in psts
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.