Documentation ¶
Index ¶
- Variables
- func GetMapWithDefaultValue(m map[string]string, key string, def string) string
- func GetPodContainerImageVersion(containerName string, podSpec *corev1.PodSpec) string
- func MergeMap(m1 map[string]string, m2 map[string]string) map[string]string
- func ObjecteMetaEqual(obj1 metav1.Object, obj2 metav1.Object) bool
- func RemoveSliceString(slice []string, s string) []string
- func SliceContainsString(slice []string, s string) bool
- func TransInt32Ptr2Int32(i *int32, def int32) int32
- func TransformK8sName(str string) string
- type Runnable
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ClusterAnnotationMonitor = "k8s.io/monitor" ClusterAnnotationLoki = "k8s.io/loki" WorkLoadAnnotationHpa = "hpa.autoscaling.dmall.com/Hpa" WorkLoadAnnotationHpaMetrics = "hpa.autoscaling.dmall.com/Metrics" IgnoreAnnotationKey = []string{ ClusterAnnotationMonitor, WorkLoadAnnotationHpa, WorkLoadAnnotationHpaMetrics, } )
annotations need ignore key
Functions ¶
func GetMapWithDefaultValue ¶
GetMapWithDefaultValue returns map specify key value, if not exist return default value
func GetPodContainerImageVersion ¶
GetPodContainerImageVersion returns podSpec specify container image version
func MergeMap ¶
MergeMap merge map which key and values both string if m2 have same key for m1, override m1
func ObjecteMetaEqual ¶
ObjecteMetaEqual compare object is equal deepequal finalizer and labels filter annotations and then deepequal annotatins
func RemoveSliceString ¶
RemoveSliceString remove slice unexpect key
func SliceContainsString ¶
SliceContainsString return slice is contains str
func TransInt32Ptr2Int32 ¶
TransInt32Ptr2Int32 transform *int32 to int32 with default value.
func TransformK8sName ¶
TransformK8sName tranform kuberntes standerd name 1. replace all '_' to '-' 2. ToLower
Types ¶
Click to show internal directories.
Click to hide internal directories.