Skip to content

Commit

Permalink
Remove additional custom labels utility (#4184) (#4188)
Browse files Browse the repository at this point in the history
(cherry picked from commit 865ebdb)
  • Loading branch information
claudio4j authored Mar 30, 2023
1 parent 3db3310 commit d99b906
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 187 deletions.
5 changes: 3 additions & 2 deletions pkg/trait/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (
"github.com/apache/camel-k/pkg/metadata"
"github.com/apache/camel-k/pkg/util"
"github.com/apache/camel-k/pkg/util/kubernetes"
"github.com/apache/camel-k/pkg/util/label"
"github.com/apache/camel-k/pkg/util/uri"
)

Expand Down Expand Up @@ -260,7 +259,9 @@ func (t *cronTrait) getCronJobFor(e *Environment) *batchv1.CronJob {
BackoffLimit: &backoffLimit,
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: label.AddLabels(e.Integration.Name),
Labels: map[string]string{
v1.IntegrationLabel: e.Integration.Name,
},
Annotations: annotations,
},
Spec: corev1.PodSpec{
Expand Down
5 changes: 3 additions & 2 deletions pkg/trait/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (

v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
traitv1 "github.com/apache/camel-k/pkg/apis/camel/v1/trait"
"github.com/apache/camel-k/pkg/util/label"
)

type deploymentTrait struct {
Expand Down Expand Up @@ -158,7 +157,9 @@ func (t *deploymentTrait) getDeploymentFor(e *Environment) *appsv1.Deployment {
},
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: label.AddLabels(e.Integration.Name),
Labels: map[string]string{
v1.IntegrationLabel: e.Integration.Name,
},
Annotations: annotations,
},
Spec: corev1.PodSpec{
Expand Down
5 changes: 3 additions & 2 deletions pkg/trait/knative_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
traitv1 "github.com/apache/camel-k/pkg/apis/camel/v1/trait"
"github.com/apache/camel-k/pkg/metadata"
"github.com/apache/camel-k/pkg/util/kubernetes"
"github.com/apache/camel-k/pkg/util/label"
)

const (
Expand Down Expand Up @@ -262,7 +261,9 @@ func (t *knativeServiceTrait) getServiceFor(e *Environment) (*serving.Service, e
ConfigurationSpec: serving.ConfigurationSpec{
Template: serving.RevisionTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: label.AddLabels(e.Integration.Name),
Labels: map[string]string{
v1.IntegrationLabel: e.Integration.Name,
},
Annotations: revisionAnnotations,
},
Spec: serving.RevisionSpec{
Expand Down
68 changes: 0 additions & 68 deletions pkg/util/label/label.go

This file was deleted.

113 changes: 0 additions & 113 deletions pkg/util/label/label_test.go

This file was deleted.

0 comments on commit d99b906

Please sign in to comment.