Documentation ¶
Index ¶
- Constants
- Variables
- func BuildExternalService(src *srapi.StarRocksCluster, name string, serviceType StarRocksServiceType, ...) corev1.Service
- func BuildHorizontalPodAutoscaler(pap *PodAutoscalerParams) client.Object
- func GetInt32Pointer(v int32) *int32
- func GetInt64ptr(n int64) *int64
- func GetPort(config map[string]interface{}, key string) int32
- func GetStringPointer(s string) *string
- func HaveEqualOwnerReference(svc1 *corev1.Service, svc2 *corev1.Service) bool
- func MergeMetadata(new *metav1.ObjectMeta, old metav1.ObjectMeta)
- func MergeSlices(new []string, old []string) []string
- func MergeStatefulSets(new *appv1.StatefulSet, old appv1.StatefulSet)
- func ResolveConfigMap(configMap *corev1.ConfigMap, key string) (map[string]interface{}, error)
- func ServiceDeepEqual(nsvc, oldsvc *corev1.Service) bool
- func StatefulSetDeepEqual(new *appv1.StatefulSet, old *appv1.StatefulSet, excludeReplicas bool) bool
- type Annotations
- type Labels
- type PodAutoscalerParams
- type StarRocksServiceType
Constants ¶
View Source
const ( HTTP_PORT = "http_port" RPC_PORT = "rpc_port" QUERY_PORT = "query_port" EDIT_LOG_PORT = "edit_log_port" )
the fe ports key
View Source
const ( THRIFT_PORT = "thrift_port" BE_PORT = "be_port" WEBSERVER_PORT = "webserver_port" HEARTBEAT_SERVICE_PORT = "heartbeat_service_port" BRPC_PORT = "brpc_port" )
the cn or be ports key
View Source
const ( FE_PROXY_HTTP_PORT = 8080 FE_PORXY_HTTP_PORT_NAME = "http-port" )
the fe proxy ports key
Variables ¶
View Source
var ( AutoscalerKind = "HorizontalPodAutoscaler" StatefulSetKind = "StatefulSet" ServiceKind = "Service" )
View Source
var DefMap = map[string]int32{ HTTP_PORT: 8030, RPC_PORT: 9020, QUERY_PORT: 9030, EDIT_LOG_PORT: 9010, THRIFT_PORT: 9060, BE_PORT: 9060, WEBSERVER_PORT: 8040, HEARTBEAT_SERVICE_PORT: 9050, BRPC_PORT: 8060, }
DefMap the default port about abilities.
Functions ¶
func BuildExternalService ¶
func BuildExternalService(src *srapi.StarRocksCluster, name string, serviceType StarRocksServiceType, config map[string]interface{}, selector map[string]string, labels map[string]string) corev1.Service
BuildExternalService build the external service. not have selector
func BuildHorizontalPodAutoscaler ¶
func BuildHorizontalPodAutoscaler(pap *PodAutoscalerParams) client.Object
func GetInt32Pointer ¶
func GetInt64ptr ¶
func GetStringPointer ¶
func HaveEqualOwnerReference ¶
func MergeMetadata ¶
func MergeMetadata(new *metav1.ObjectMeta, old metav1.ObjectMeta)
MergeMetadata takes labels and annotations from the old resource and merges them into the new resource. If a key is present in both resources, the new resource wins. It also copies the ResourceVersion from the old resource to the new resource to prevent update conflicts.
func MergeSlices ¶
func MergeStatefulSets ¶
func MergeStatefulSets(new *appv1.StatefulSet, old appv1.StatefulSet)
MergeStatefulSets merge exist statefulset and new statefulset.
func ResolveConfigMap ¶
func ServiceDeepEqual ¶
func StatefulSetDeepEqual ¶
func StatefulSetDeepEqual(new *appv1.StatefulSet, old *appv1.StatefulSet, excludeReplicas bool) bool
StatefulSetDeepEqual judge two statefulset equal or not.
Types ¶
type Annotations ¶
func (Annotations) Add ¶
func (a Annotations) Add(key, value string)
func (Annotations) AddAnnotation ¶
func (a Annotations) AddAnnotation(annotation Annotations)
type PodAutoscalerParams ¶
type PodAutoscalerParams struct { AutoscalerType srapi.AutoScalerVersion Namespace string Name string Labels Labels TargetName string OwnerReferences []metav1.OwnerReference ScalerPolicy *srapi.AutoScalingPolicy }
type StarRocksServiceType ¶
type StarRocksServiceType string
const ( FeService StarRocksServiceType = "fe" BeService StarRocksServiceType = "be" CnService StarRocksServiceType = "cn" FeProxyService StarRocksServiceType = "fe-proxy" )
Click to show internal directories.
Click to hide internal directories.