Skip to content

Commit

Permalink
Fix after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaferraro committed Dec 6, 2018
1 parent b54b095 commit 537c64e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
1 change: 0 additions & 1 deletion pkg/trait/knative.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package trait
import (
"encoding/json"
"fmt"
"strings"

"github.com/operator-framework/operator-sdk/pkg/sdk"
"github.com/pkg/errors"
Expand Down
16 changes: 3 additions & 13 deletions pkg/trait/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package trait
import (
"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
"github.com/apache/camel-k/pkg/metadata"
"k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
Expand All @@ -45,18 +44,9 @@ func (s *serviceTrait) appliesTo(e *Environment) bool {

func (s *serviceTrait) autoconfigure(e *Environment) error {
if s.Enabled == nil {
hasDeployment := false
e.Resources.VisitDeployment(func(s *v1.Deployment) {
hasDeployment = true
})
if hasDeployment {
meta := metadata.ExtractAll(e.Integration.Spec.Sources)
required := meta.RequiresHTTPService
s.Enabled = &required
} else {
enabled := false
s.Enabled = &enabled
}
meta := metadata.ExtractAll(e.Integration.Spec.Sources)
required := meta.RequiresHTTPService
s.Enabled = &required
}
return nil
}
Expand Down

0 comments on commit 537c64e

Please sign in to comment.