package consts

const (
	SpecScaleStatusPendingScale       = "pending-scale"
	SpecScaleStatusNewNodeGroupSynced = "new-nodegroup-synced"
	SpecScaleStatusResourceUpdated    = "resource-updated"
	SpecScaleStatusNormal             = "normal"
)

const (
	// PriorityClassNameClusterCritical ensures that
	// when a node triggers an eviction due to memory pressure,
	// the agent pod is the last one evicted if multiple pod memory usage exceeds the request.
	// Refer to:
	// - https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/
	// - https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
	PriorityClassNameClusterCritical = "tidb-cluster-o11y-critical"

	// PriorityClassNameNodeCritical priority class ensures that
	// when a node triggers an eviction due to memory pressure,
	// the agent pod is the last one evicted if multiple pod memory usage exceeds the request.
	// Refer to:
	// - https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/
	// - https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
	PriorityClassNameNodeCritical = "dataplane-node-o11y-critical"

	// PriorityClassNameNodeNonCritical to ensure the stability of TiDB components,
	// we set a lower priority for the log agent.
	// In particular, when the log agent has a large number of log fds that have not been
	// released, the log agent can be evicted first to free up disk space.
	PriorityClassNameNodeNonCritical = "dataplane-node-o11y-noncritical"
)

const (
	MetricsAgentStorageClassName     = "o11y-metric-agent"
	AWSVolumeTypeGP3                 = "gp3"
	MetricsAgentGp3IOPS              = 3000
	MetricsAgentGp3ThroughputMBps    = 125
	GCPVolumeTypePDSSD               = "pd-ssd"
	AzureVolumeTypePremiumLRS        = "Premium_LRS"
	AliCloudVolumeTypeESSD           = "cloud_essd"
	ServerlessObservabilityNamespace = "observability"
)

func IsTiProxyDeployTypeSharedTiProxy(m map[string]string) bool {
	if v, ok := m[AnnotationKeyO11yTiProxyDeployType]; ok && v == "shared_tiproxy" {
		return true
	}
	return false
}
