Documentation
¶
Index ¶
- Constants
- func IsLingjunNodeType(nodeType string) bool
- func LingjunToleration() corev1.Toleration
- func LingjunTolerations() []corev1.Toleration
- func ParseAllocIPSucceedLatency(message string) (time.Duration, error)
- type Deployment
- func (d *Deployment) WithAnnotations(annotations map[string]string) *Deployment
- func (d *Deployment) WithLabels(labels map[string]string) *Deployment
- func (d *Deployment) WithLingjunToleration() *Deployment
- func (d *Deployment) WithNodeAffinity(labels map[string]string) *Deployment
- func (d *Deployment) WithNodeAffinityExclude(excludeLabels map[string]string) *Deployment
- func (d *Deployment) WithPodAffinity(labels map[string]string) *Deployment
- func (d *Deployment) WithTolerations(tolerations []corev1.Toleration) *Deployment
- type LatencyStats
Constants ¶
const ( // LingjunTaintKey is the taint key for Lingjun nodes LingjunTaintKey = "node-role.alibabacloud.com/lingjun" // LingjunWorkerLabelKey is the label key for Lingjun worker nodes LingjunWorkerLabelKey = "alibabacloud.com/lingjun-worker" // ExclusiveENILabelKey is the label key for exclusive ENI mode nodes ExclusiveENILabelKey = "k8s.aliyun.com/exclusive-mode-eni-type" // ExclusiveENILabelValue is the label value for exclusive ENI mode nodes ExclusiveENILabelValue = "eniOnly" )
Variables ¶
This section is empty.
Functions ¶
func IsLingjunNodeType ¶ added in v1.16.5
IsLingjunNodeType checks if the given node type string represents a Lingjun node
func LingjunToleration ¶ added in v1.16.5
func LingjunToleration() corev1.Toleration
LingjunToleration returns the toleration for Lingjun nodes
func LingjunTolerations ¶ added in v1.16.5
func LingjunTolerations() []corev1.Toleration
LingjunTolerations returns a slice containing the Lingjun toleration
func ParseAllocIPSucceedLatency ¶ added in v1.16.5
ParseAllocIPSucceedLatency parses the latency from AllocIPSucceed event message Example message: "Alloc IP 10.186.243.34/16-2001:db8:0000:0000:40ce:fc69:8c7:210a/64 took 37.358159ms"
Types ¶
type Deployment ¶ added in v1.16.5
type Deployment struct {
*appsv1.Deployment
}
Deployment is a builder for creating deployment configurations
func NewDeployment ¶ added in v1.16.5
func NewDeployment(name, namespace string, replicas int32) *Deployment
NewDeployment creates a new deployment builder
func (*Deployment) WithAnnotations ¶ added in v1.16.5
func (d *Deployment) WithAnnotations(annotations map[string]string) *Deployment
WithAnnotations adds annotations to the pod template
func (*Deployment) WithLabels ¶ added in v1.16.5
func (d *Deployment) WithLabels(labels map[string]string) *Deployment
WithLabels adds labels to the pod template
func (*Deployment) WithLingjunToleration ¶ added in v1.16.5
func (d *Deployment) WithLingjunToleration() *Deployment
WithLingjunToleration adds toleration for Lingjun nodes
func (*Deployment) WithNodeAffinity ¶ added in v1.16.5
func (d *Deployment) WithNodeAffinity(labels map[string]string) *Deployment
WithNodeAffinity adds node affinity to the deployment
func (*Deployment) WithNodeAffinityExclude ¶ added in v1.16.5
func (d *Deployment) WithNodeAffinityExclude(excludeLabels map[string]string) *Deployment
WithNodeAffinityExclude adds node affinity exclusion to the deployment
func (*Deployment) WithPodAffinity ¶ added in v1.16.5
func (d *Deployment) WithPodAffinity(labels map[string]string) *Deployment
WithPodAffinity adds pod affinity to schedule pods to the same node as pods with specified labels
func (*Deployment) WithTolerations ¶ added in v1.16.5
func (d *Deployment) WithTolerations(tolerations []corev1.Toleration) *Deployment
WithTolerations adds tolerations to the deployment
type LatencyStats ¶ added in v1.16.5
type LatencyStats struct {
P99 time.Duration
P90 time.Duration
Max time.Duration
Min time.Duration
Avg time.Duration
N int
}
LatencyStats contains latency statistics
func CalculateLatencyStats ¶ added in v1.16.5
func CalculateLatencyStats(latencies []time.Duration) LatencyStats
CalculateLatencyStats calculates latency statistics from a slice of durations
func (LatencyStats) String ¶ added in v1.16.5
func (s LatencyStats) String() string
String returns a formatted string of latency stats