package common

import "fmt"

const (
	Environment = "environment"
	ServiceType = "servicetype"
	Tenant      = "tenant"
	UsedBy      = "usedby"

	Component = "component"

	Tanant  = "billing-tenant-id"
	Project = "project"
	Cluster = "cluster"
)

const (
	ServiceName = "kubernetes.io/service-name"

	Loadbalance        = "nlb"
	PrivateLoadbalance = "nlb-private"

	Dedicated = "dedicated"
	Devtier   = "devtier"

	CustomerTiDB = "customer-tidb"
)

func GetKubeClusterTagKey(technicalID string) string {
	return fmt.Sprintf("kubernetes.io/cluster/%s", technicalID)
}

func ConcatenateComponetTags(tags map[string]string, component string) map[string]string {
	new := map[string]string{}
	for k, v := range tags {
		new[k] = v
	}

	new[Component] = component
	return new
}

func ConcatenateTags(tags map[string]string, ext map[string]string) map[string]string {
	new := map[string]string{}

	for k, v := range tags {
		new[k] = v
	}
	for k, v := range ext {
		new[k] = v
	}

	return new
}
