generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
featuresfeaturesfeatures
Description
Currently, most label keys used in Fluid are got from "getXXXLabelName"-style functions with RuntimeInfo or RuntimeEngine as their receivers.
For example:
type RuntimeInfoInterface interface {
// GetStoragetLabelname(read common.ReadType, storage common.StorageType) string
GetLabelNameForMemory() string
GetLabelNameForDisk() string
GetLabelNameForTotal() string
GetCommonLabelName() string
GetRuntimeLabelName() string
GetDatasetNumLabelName() string
....
}
This regards the label keys as members of these structs. While I think it's better to think label keys as a convention defined by Fluid. Therefore, I suggest we should make the functions as common utils. Like:
func GetCommonLabelName(namespace, name string) {
return common.LabelAnnotationStorageCapacityPrefix + namespace + "-" + name
}
Metadata
Metadata
Assignees
Labels
featuresfeaturesfeatures