Skip to content

Commit

Permalink
Modify labels for controller resources (#1621)
Browse files Browse the repository at this point in the history
* Change labels for controller resources

* Fix Label in test
  • Loading branch information
andreyvelich authored Aug 14, 2021
1 parent f42c6cc commit 4ef26ef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
6 changes: 3 additions & 3 deletions pkg/controller.v1beta1/consts/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions pkg/controller.v1beta1/suggestion/composer/composer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
6 changes: 0 additions & 6 deletions pkg/controller.v1beta1/util/annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 4ef26ef

Please sign in to comment.