diff --git a/pkg/controller.v1beta1/consts/const.go b/pkg/controller.v1beta1/consts/const.go index 0ac309ddbdc..56c690a55ab 100644 --- a/pkg/controller.v1beta1/consts/const.go +++ b/pkg/controller.v1beta1/consts/const.go @@ -50,11 +50,11 @@ const ( ConfigTrialResources = "trial-resources" // LabelExperimentName is the label of experiment name. - LabelExperimentName = "experiment" + LabelExperimentName = "katib.kubeflow.org/experiment" // LabelSuggestionName is the label of suggestion name. - LabelSuggestionName = "suggestion" + LabelSuggestionName = "katib.kubeflow.org/suggestion" // LabelDeploymentName is the label of deployment name. - LabelDeploymentName = "deployment" + LabelDeploymentName = "katib.kubeflow.org/deployment" // ContainerSuggestion is the container name to run Suggestion service. ContainerSuggestion = "suggestion" diff --git a/pkg/controller.v1beta1/suggestion/composer/composer_test.go b/pkg/controller.v1beta1/suggestion/composer/composer_test.go index ba49cb52b6e..7f5e8168bf8 100644 --- a/pkg/controller.v1beta1/suggestion/composer/composer_test.go +++ b/pkg/controller.v1beta1/suggestion/composer/composer_test.go @@ -69,10 +69,10 @@ var ( } deploymentLabels = map[string]string{ - "custom-label": "test", - "deployment": suggestionName + "-" + suggestionAlgorithm, - "experiment": suggestionName, - "suggestion": suggestionName, + "custom-label": "test", + consts.LabelDeploymentName: suggestionName + "-" + suggestionAlgorithm, + consts.LabelExperimentName: suggestionName, + consts.LabelSuggestionName: suggestionName, } podAnnotations = map[string]string{ diff --git a/pkg/controller.v1beta1/util/annotations.go b/pkg/controller.v1beta1/util/annotations.go index ccd5a378747..a5017eef3bf 100644 --- a/pkg/controller.v1beta1/util/annotations.go +++ b/pkg/controller.v1beta1/util/annotations.go @@ -17,16 +17,10 @@ limitations under the License. package util import ( - logf "sigs.k8s.io/controller-runtime/pkg/log" - suggestionsv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1" "github.com/kubeflow/katib/pkg/controller.v1beta1/consts" ) -var ( - log = logf.Log.WithName("util-annotations") -) - // SuggestionAnnotations returns the expected suggestion annotations. func SuggestionAnnotations(instance *suggestionsv1beta1.Suggestion) map[string]string { return appendAnnotation(