You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/12/02 08:27:15 UTC

[GitHub] [camel-k] squakez commented on a diff in pull request #3870: fix(service): Create k8s service when knative-service trait is disabled (1.10.x)

squakez commented on code in PR #3870:
URL: https://github.com/apache/camel-k/pull/3870#discussion_r1037891632


##########
pkg/trait/service.go:
##########
@@ -44,7 +44,7 @@ func newServiceTrait() Trait {
 // IsAllowedInProfile overrides default.
 func (t *serviceTrait) IsAllowedInProfile(profile v1.TraitProfile) bool {
 	return profile.Equal(v1.TraitProfileKubernetes) ||

Review Comment:
   This is always `true` then. We should remove the func.



##########
pkg/trait/service.go:
##########
@@ -61,6 +61,15 @@ func (t *serviceTrait) Configure(e *Environment) (bool, error) {
 		return false, nil
 	}
 
+	// in case the knative-service and service trait are enabled, the knative-service has priority
+	// then this service is disabled
+	if e.GetTrait(knativeServiceTraitID) != nil {

Review Comment:
   Have you considered any other place where to provide this check? I mean, it would be nice not to have dependency between traits (if it is possible, of course).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org