transformer

package
v0.0.0-...-22a2038 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MonitorNamespacedRoleName        = "doris-monitor"
	MonitorNamespacedRoleBindingName = "doris-monitor-binding"
	MonitorNamespacedAccountName     = "doris-monitor"
)
View Source
const (
	DefaultBeHeartbeatServicePort = 9050
	DefaultBePort                 = 9060
	DefaultBeWebserverPort        = 8040
	DefaultBeBrpcPort             = 8060

	BeProbeTimeoutSec = 200

	BeRootPath              = "/opt/apache-doris/be"
	BeCustomStorageRootPath = "/var/lib/doris/data"
)
View Source
const (
	DefaultBrokerIpcPort  = 8000
	BrokerProbeTimeoutSec = 100
)
View Source
const (
	DefaultFeHttpPort    = 8030
	DefaultFeEditLogPort = 9010
	DefaultFeRpcPort     = 9020
	DefaultFeQueryPort   = 9030
)
View Source
const (
	K8sNameLabelKey      = "app.kubernetes.io/name"
	K8sInstanceLabelKey  = "app.kubernetes.io/instance"
	K8sManagedByLabelKey = "app.kubernetes.io/managed-by"
	K8sComponentLabelKey = "app.kubernetes.io/component"

	DorisK8sNameLabelValue      = "doris-cluster"
	DorisK8sManagedByLabelValue = "doris-operator"

	PrometheusPathAnnoKey   = "prometheus.io/path"
	PrometheusPortAnnoKey   = "prometheus.io/port"
	PrometheusScrapeAnnoKey = "prometheus.io/scrape"

	DefaultBusyBoxImage = "busybox:1.36"
)
View Source
const (
	JvmOptKey        = "JAVA_OPTS"
	JvmOpt9Key       = "JAVA_OPTS_FOR_JDK_9"
	JvmRamPercentage = 75
)
View Source
const (
	CnProbeTimeoutSec = 200
)
View Source
const (
	DefaultGrafanaImage = "grafana/grafana:9.5.2"
)
View Source
const (
	DefaultHpaPeriodSeconds int32 = 60
)
View Source
const (
	DefaultLokiImage = "grafana/loki:2.9.1"
)
View Source
const (
	DefaultMysqlclientImage = "tnir/mysqlclient:1.4.6"
)
View Source
const (
	DefaultPrometheusImage = "prom/prometheus:v2.37.8"
)
View Source
const (
	DefaultPromtailImage = "grafana/promtail:2.9.1"
)
View Source
const DorisPasswordChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-=_+[]{}"

Variables

View Source
var (
	GrafanaDataSourceConfTmpl    = template.NewTemplateOrPanic("grafana-datasource-conf", "monitor/grafana-datasource.yml")
	GrafanaDashboardConfContent  = template.ReadOrPanic("monitor/grafana-dashboard.yml")
	GrafanaDashboardsConfContent = template.ReadOrPanic("monitor/grafana-dashboards.json")
)
View Source
var (
	InitializerCheckConnScriptContent = template.ReadOrPanic("initializer/check-conn.sh")
	InitializerStartScriptContent     = template.ReadOrPanic("initializer/start-script.py")
)
View Source
var DefaultBrokerLog4jContent = template.ReadOrPanic("broker/log4j.properties")
View Source
var (
	LokiConfTmpl = template.NewTemplateOrPanic("loki-conf", "monitor/loki.yml")
)
View Source
var (
	PrometheusConfTmpl = template.NewTemplateOrPanic("prometheus-conf", "monitor/prometheus.yml")
)
View Source
var (
	PromtailConfTmpl = template.NewTemplateOrPanic("promtail-conf", "monitor/promtail.yml")
)

Functions

func GenerateRandomDorisPassword

func GenerateRandomDorisPassword(length int) string

func GetBeBrpcPort

func GetBeBrpcPort(cr *dapi.DorisCluster) int32

func GetBeComponentLabels

func GetBeComponentLabels(dorisClusterKey types.NamespacedName) map[string]string

func GetBeConfigMapKey

func GetBeConfigMapKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetBeExpectPodNames

func GetBeExpectPodNames(dorisClusterKey types.NamespacedName, replicas int32) []string

func GetBeHeartbeatServicePort

func GetBeHeartbeatServicePort(cr *dapi.DorisCluster) int32

func GetBeImage

func GetBeImage(r *dapi.DorisCluster) string

func GetBePeerServiceKey

func GetBePeerServiceKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetBePort

func GetBePort(cr *dapi.DorisCluster) int32

func GetBeServiceKey

func GetBeServiceKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetBeStatefulSetKey

func GetBeStatefulSetKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetBeWebserverPort

func GetBeWebserverPort(cr *dapi.DorisCluster) int32

func GetBrokerComponentLabels

func GetBrokerComponentLabels(dorisClusterKey types.NamespacedName) map[string]string

func GetBrokerConfigMapKey

func GetBrokerConfigMapKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetBrokerExpectPodNames

func GetBrokerExpectPodNames(dorisClusterKey types.NamespacedName, replicas int32) []string

func GetBrokerImage

func GetBrokerImage(r *dapi.DorisCluster) string

func GetBrokerIpcPort

func GetBrokerIpcPort(cr *dapi.DorisCluster) int32

func GetBrokerPeerServiceKey

func GetBrokerPeerServiceKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetBrokerStatefulSetKey

func GetBrokerStatefulSetKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetBusyBoxImage

func GetBusyBoxImage(cr *dapi.DorisCluster) string

func GetCnAutoscalerLabels

func GetCnAutoscalerLabels(dorisClusterName string) map[string]string

func GetCnBrpcPort

func GetCnBrpcPort(cr *dapi.DorisCluster) int32

func GetCnComponentLabels

func GetCnComponentLabels(dorisClusterKey types.NamespacedName) map[string]string

func GetCnConfigMapKey

func GetCnConfigMapKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetCnExpectPodNames

func GetCnExpectPodNames(dorisClusterKey types.NamespacedName, replicas int32) []string

func GetCnHeartbeatServicePort

func GetCnHeartbeatServicePort(cr *dapi.DorisCluster) int32

func GetCnImage

func GetCnImage(r *dapi.DorisCluster) string

func GetCnPeerServiceKey

func GetCnPeerServiceKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetCnPort

func GetCnPort(cr *dapi.DorisCluster) int32

func GetCnScaleDownHpaKey

func GetCnScaleDownHpaKey(dorisAutoScalerKey types.NamespacedName) types.NamespacedName

func GetCnScaleUpHpaKey

func GetCnScaleUpHpaKey(dorisAutoScalerKey types.NamespacedName) types.NamespacedName

func GetCnServiceKey

func GetCnServiceKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetCnStatefulSetKey

func GetCnStatefulSetKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetCnWebserverPort

func GetCnWebserverPort(cr *dapi.DorisCluster) int32

func GetFeComponentLabels

func GetFeComponentLabels(dorisClusterKey types.NamespacedName) map[string]string

func GetFeConfigMapKey

func GetFeConfigMapKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetFeEditLogPort

func GetFeEditLogPort(cr *dapi.DorisCluster) int32

func GetFeExpectPodNames

func GetFeExpectPodNames(dorisClusterKey types.NamespacedName, replicas int32) []string

func GetFeHttpPort

func GetFeHttpPort(cr *dapi.DorisCluster) int32

func GetFeImage

func GetFeImage(r *dapi.DorisCluster) string

func GetFePeerServiceKey

func GetFePeerServiceKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetFeQueryPort

func GetFeQueryPort(cr *dapi.DorisCluster) int32

func GetFeRpcPort

func GetFeRpcPort(cr *dapi.DorisCluster) int32

func GetFeServiceDNS

func GetFeServiceDNS(dorisClusterKey types.NamespacedName) string

func GetFeServiceKey

func GetFeServiceKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetFeStatefulSetKey

func GetFeStatefulSetKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetGrafanaConfigMapKey

func GetGrafanaConfigMapKey(monitorKey types.NamespacedName) types.NamespacedName

func GetGrafanaLabels

func GetGrafanaLabels(dorisClusterKey types.NamespacedName) map[string]string

func GetGrafanaSecretKey

func GetGrafanaSecretKey(monitorKey types.NamespacedName) types.NamespacedName

func GetGrafanaServiceKey

func GetGrafanaServiceKey(monitorKey types.NamespacedName) types.NamespacedName

func GetGrafanaStatefulsetKey

func GetGrafanaStatefulsetKey(monitorKey types.NamespacedName) types.NamespacedName

func GetInitializerConfigMapKey

func GetInitializerConfigMapKey(initKey types.NamespacedName) types.NamespacedName

func GetInitializerImage

func GetInitializerImage(r *dapi.DorisInitializer) string

func GetInitializerJobKey

func GetInitializerJobKey(initKey types.NamespacedName) types.NamespacedName

func GetInitializerLabels

func GetInitializerLabels(dorisClusterName string) map[string]string

func GetInitializerSecretKey

func GetInitializerSecretKey(initKey types.NamespacedName) types.NamespacedName

func GetLokiConfigMapKey

func GetLokiConfigMapKey(monitorKey types.NamespacedName) types.NamespacedName

func GetLokiLabels

func GetLokiLabels(dorisClusterKey types.NamespacedName) map[string]string

func GetLokiServiceKey

func GetLokiServiceKey(monitorKey types.NamespacedName) types.NamespacedName

func GetLokiStatefulsetKey

func GetLokiStatefulsetKey(monitorKey types.NamespacedName) types.NamespacedName

func GetMonitorPrometheusLabels

func GetMonitorPrometheusLabels(dorisClusterKey types.NamespacedName) map[string]string

func GetOprSqlAccountSecretKey

func GetOprSqlAccountSecretKey(dorisClusterKey types.NamespacedName) types.NamespacedName

func GetPrometheusConfigMapKey

func GetPrometheusConfigMapKey(monitorKey types.NamespacedName) types.NamespacedName

func GetPrometheusServiceKey

func GetPrometheusServiceKey(monitorKey types.NamespacedName) types.NamespacedName

func GetPrometheusStatefulsetKey

func GetPrometheusStatefulsetKey(monitorKey types.NamespacedName) types.NamespacedName

func GetPromtailConfigMapKey

func GetPromtailConfigMapKey(monitorKey types.NamespacedName) types.NamespacedName

func GetPromtailDaemonSetKey

func GetPromtailDaemonSetKey(monitorKey types.NamespacedName) types.NamespacedName

func GetPromtailLabels

func GetPromtailLabels(dorisClusterKey types.NamespacedName) map[string]string

func MakeBeConfigMap

func MakeBeConfigMap(cr *dapi.DorisCluster, scheme *runtime.Scheme) *corev1.ConfigMap

func MakeBePeerService

func MakeBePeerService(cr *dapi.DorisCluster, scheme *runtime.Scheme) *corev1.Service

func MakeBeService

func MakeBeService(cr *dapi.DorisCluster, scheme *runtime.Scheme) *corev1.Service

func MakeBeStatefulSet

func MakeBeStatefulSet(cr *dapi.DorisCluster, scheme *runtime.Scheme) *appv1.StatefulSet

func MakeBrokerConfigMap

func MakeBrokerConfigMap(cr *dapi.DorisCluster, scheme *runtime.Scheme) *corev1.ConfigMap

func MakeBrokerPeerService

func MakeBrokerPeerService(cr *dapi.DorisCluster, scheme *runtime.Scheme) *corev1.Service

func MakeBrokerStatefulSet

func MakeBrokerStatefulSet(cr *dapi.DorisCluster, scheme *runtime.Scheme) *appv1.StatefulSet

func MakeCnConfigMap

func MakeCnConfigMap(cr *dapi.DorisCluster, scheme *runtime.Scheme) *corev1.ConfigMap

func MakeCnPeerService

func MakeCnPeerService(cr *dapi.DorisCluster, scheme *runtime.Scheme) *corev1.Service

func MakeCnScaleDownHpa

func MakeCnScaleDownHpa(cr *dapi.DorisAutoscaler, scheme *runtime.Scheme) *acv2.HorizontalPodAutoscaler

func MakeCnService

func MakeCnService(cr *dapi.DorisCluster, scheme *runtime.Scheme) *corev1.Service

func MakeCnStatefulSet

func MakeCnStatefulSet(cr *dapi.DorisCluster, scheme *runtime.Scheme) *appv1.StatefulSet

func MakeFeConfigMap

func MakeFeConfigMap(cr *dapi.DorisCluster, scheme *runtime.Scheme) *corev1.ConfigMap

func MakeFePeerService

func MakeFePeerService(cr *dapi.DorisCluster, scheme *runtime.Scheme) *corev1.Service

func MakeFeService

func MakeFeService(cr *dapi.DorisCluster, scheme *runtime.Scheme) *corev1.Service

func MakeFeStatefulSet

func MakeFeStatefulSet(cr *dapi.DorisCluster, scheme *runtime.Scheme) *appv1.StatefulSet

func MakeGrafanaConfigMap

func MakeGrafanaConfigMap(cr *dapi.DorisMonitor, scheme *runtime.Scheme) (*corev1.ConfigMap, error)

func MakeGrafanaSecret

func MakeGrafanaSecret(cr *dapi.DorisMonitor, scheme *runtime.Scheme) *corev1.Secret

func MakeGrafanaService

func MakeGrafanaService(cr *dapi.DorisMonitor, scheme *runtime.Scheme) *corev1.Service

func MakeGrafanaStatefulset

func MakeGrafanaStatefulset(cr *dapi.DorisMonitor, scheme *runtime.Scheme) *appv1.StatefulSet

func MakeInitializerConfigMap

func MakeInitializerConfigMap(cr *dapi.DorisInitializer, scheme *runtime.Scheme) *corev1.ConfigMap

func MakeInitializerJob

func MakeInitializerJob(cr *dapi.DorisInitializer, feSvcQueryPort int32, scheme *runtime.Scheme) *batchv1.Job

func MakeInitializerSecret

func MakeInitializerSecret(cr *dapi.DorisInitializer, scheme *runtime.Scheme) *corev1.Secret

func MakeLokiConfigMap

func MakeLokiConfigMap(cr *dapi.DorisMonitor, scheme *runtime.Scheme) (*corev1.ConfigMap, error)

func MakeLokiService

func MakeLokiService(cr *dapi.DorisMonitor, scheme *runtime.Scheme) *corev1.Service

func MakeLokiStatefulset

func MakeLokiStatefulset(cr *dapi.DorisMonitor, scheme *runtime.Scheme) *appv1.StatefulSet

func MakeMonitorNamespacedRole

func MakeMonitorNamespacedRole(namespace string) *rbacv1.Role

func MakeMonitorNamespacedRoleBinding

func MakeMonitorNamespacedRoleBinding(namespace string) *rbacv1.RoleBinding

func MakeMonitorNamespacedServiceAccount

func MakeMonitorNamespacedServiceAccount(namespace string) *corev1.ServiceAccount

func MakeOprSqlAccountSecret

func MakeOprSqlAccountSecret(cr *dapi.DorisCluster) *corev1.Secret

MakeOprSqlAccountSecret generates a Secret for the operator SQL account.

func MakePrometheusAnnotations

func MakePrometheusAnnotations(path string, port int32) map[string]string

MakePrometheusAnnotations make the prometheus discovery annotations

func MakePrometheusConfigMap

func MakePrometheusConfigMap(cr *dapi.DorisMonitor, scheme *runtime.Scheme) (*corev1.ConfigMap, error)

func MakePrometheusService

func MakePrometheusService(cr *dapi.DorisMonitor, scheme *runtime.Scheme) *corev1.Service

func MakePrometheusStatefulset

func MakePrometheusStatefulset(cr *dapi.DorisMonitor, scheme *runtime.Scheme) *appv1.StatefulSet

func MakePromtailConfigMap

func MakePromtailConfigMap(cr *dapi.DorisMonitor, scheme *runtime.Scheme) (*corev1.ConfigMap, error)

func MakePromtailDaemonSet

func MakePromtailDaemonSet(cr *dapi.DorisMonitor, scheme *runtime.Scheme) *appv1.DaemonSet

func MakeResourceLabels

func MakeResourceLabels(dorisName string, component string) map[string]string

MakeResourceLabels make the k8s label meta for the managed resource

Types

type GrafanaDataSourceTmplData

type GrafanaDataSourceTmplData struct {
	PrometheusName      string
	PrometheusNamespace string
	LokiName            string
	LokiNamespace       string
}

type LokiTmplData

type LokiTmplData struct {
	RetentionDeletesEnables bool
	RetentionPeriod         string
}

type PromtailTmplData

type PromtailTmplData struct {
	LokiName         string
	LokiNamespace    string
	ClusterName      string
	ClusterNamespace string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL